Check Port on Remote Server CentOS 6.6/RHEL 6

Print Friendly and PDF
centos linux nc

Checking port available on a remote machine using nc command instead of telnet. Same command can be used to check on a remote server as well, change the with IP address of the server.

Single Port Check

nc -zv 80

Range of ports:

nc -zv 20-30

Output :

root@server ~]# nc -zv 443
Connection to 443 port [tcp/https] succeeded!
[root@server ~]# nc -zv 443-445
Connection to 443 port [tcp/https] succeeded!
Connection to 444 port [tcp/snpp] succeeded!
nc: connect to port 445 (tcp) failed: Connection refused
[root@server ~]#
Written on April 1, 2016