How To Check SSH Port Status
Check SSH port 22 with telnet
When you’re configuring new SSH server, it’s possible that connection won’t work right away. That’s when it will be useful for you to know how to check SSH port status.
Use telnet to check SSH port
The easiest approach has traditionally been to use telnet command. It’s also a more universal way of checking SSH port because telnet is usually found in Windows operating system. In fact, you can check any port using telnet.
INTERESTING: Since telnet is an clear text protocol (no encryption), it’s being phased out so it’s quite possible that you won’t find telnet command installed by default in your Linux/Unix system or even modern Windows or MacOS based desktop.
Provided telnet is installed (yum install telnet in CentOS/RedHat/Fedora Linux, for example) though, here’s how you can check SSH port on remote server:
If you can see the SSH version information as highlighted above, the SSH port
is open and SSH server is functioning properly.
If port 22 is open but SSH server is not listening on it, you’ll get an error like this:
My default way of checking remote connectivity is to use ssh command to initiate client connection to remote SSH server using verbose output.
In this example, I’m checking connectivity to vps1 server on port 212:
That’s it for today!
See Also
- SSH command
- SSH port
- SSH port forwarding
- Advanced Unix Commands
- Important SSH server configuration options
- How To: Generate SSH key
- How To: Change SSH key passphrase
- SSH reference
Check SSH port 22 with telnet
When you’re configuring new SSH server, it’s possible that connection won’t work right away. That’s when it will be useful for you to know how to check SSH port status.
Use telnet to check SSH port
The easiest approach has traditionally been to use telnet command. It’s also a more universal way of checking SSH port because telnet is usually found in Windows operating system. In fact, you can check any port using telnet.
INTERESTING: Since telnet is an clear text protocol (no encryption), it’s being phased out so it’s quite possible that you won’t find telnet command installed by default in your Linux/Unix system or even modern Windows or MacOS based desktop.
Provided telnet is installed (yum install telnet in CentOS/RedHat/Fedora Linux, for example) though, here’s how you can check SSH port on remote server:
If you can see the SSH version information as highlighted above, the SSH port
is open and SSH server is functioning properly.
If port 22 is open but SSH server is not listening on it, you’ll get an error like this:
My default way of checking remote connectivity is to use ssh command to initiate client connection to remote SSH server using verbose output.
In this example, I’m checking connectivity to vps1 server on port 212:
That’s it for today!
See Also
- SSH command
- SSH port
- SSH port forwarding
- Advanced Unix Commands
- Important SSH server configuration options
- How To: Generate SSH key
- How To: Change SSH key passphrase
- SSH reference