Friday, April 11, 2014

How to check the listening port of a remote host in solaris - How to install netcat utility in solaris

In order to monitor the listening port on a remote machine, netcat utility is a very simple tool to get the job done.

Installatoin of netcat utility:

Step1: Download the software from the sourceforge.net 

Step2: untar the file

gtar -xzf netcat-0.7.1.tar.gz

Step3: navigate to the untarred folder ex:netcat-0.7.1

Step4: ./configure --prefix=/netcat_solaris/netcat (Netcat installation path)

Step5: make and make install

Step6: This would install the netcat utility to your solaris box.

 Usage:

If the port is listening: 

bash-3.00# ./nc -zv <remotehostname> 9080
output: <remothostname> [remote IP] 9080 open

If the port is not listening:

bash-3.00# ./nc -zv <remotehostname> 2899
<remotehostname> [<remote IP> ] 2899: Connection refused

                                 (: Happy learning :)

0 comments:

Post a Comment