How to test if remote TCP port is opened from Shell script?


$ nc -z <host> <port>; echo $?

Comentários