Checking for open ports on other systems

Testing connectivity and port availability using SSH instead of Telnet – Unix & Linux Stack Exchange

Windows:

Port open:

C:\>ssh -p 121 p4-mfg
kex_exchange_identification: read: Connection reset

Port closed:

C:\>ssh -p 120 p4-mfg
ssh: connect to host p4-mfg port 120: Connection timed out

Linux:

Use the -p option. For example port open:

$ ssh -p 111 192.168.1.16
ssh_exchange_identification: read: Connection reset by peer
Port closed:

$ ssh -p 112 192.168.1.16
ssh: connect to host 192.168.1.16 port 112: Connection refused

This entry was posted in Cmd scripting, Operational Technology, Security, System/DB Administration. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.