It is better to scan the server once to detect any unwanted services. It helps in harden the security of the server and minimizes security threats. Linux provides a command nc command to scan the open ports on a host. Typically it comes with default installation. If not, you can use following command to install it.
yum -y install nc
To scan a host with IP address “172.16.5.20″ for ports ranging from 1 to 1023, use the following command.
[neo@techpulp ~]# nc -z 172.16.5.20 1-1023
Connection to 172.16.5.20 80 port [tcp/http] succeeded!
Connection to 172.16.5.20 443 port [tcp/ssh] succeeded!
Connection to 172.16.5.20 904 port [tcp/vmware-authd] succeeded!