How to check SSH port availability

12.03.2026
Complexity
min.

Summary

If SSH won't connect, check whether the SSH port (default 22) is reachable from your computer and open on the server.

Applies to:
✔ VPS
✔ Dedicated servers
✔ Linux, macOS, Windows

Check port from the client side

Linux/macOS

nc -zv SERVER_IP 22

Via telnet:

telnet SERVER_IP 22

Windows

Test-NetConnection -ComputerName SERVER_IP -Port 22

Check port on the server

Via VNC/IPMI console:

ss -tlnp | grep :22

If SSH listens on a different port:

ss -tlnp | grep sshd
grep "^Port" /etc/ssh/sshd_config

Check server firewall

iptables:

iptables -L -n | grep 22

UFW:

ufw status

firewalld:

firewall-cmd --list-all

If SSH port is not open:

ufw allow 22/tcp

Non-standard SSH port

ssh -p 2222 root@SERVER_IP
nc -zv SERVER_IP 2222

Verification

ssh root@SERVER_IP
If the port is open on the server but unreachable from your computer, your ISP may be blocking it. Try connecting from a different network. If the problem persists, open a support ticket.
Was this information helpful?
Yes   No
 
By continuing to use this website you will be agreeing to the website Acceptable Use Policy and the Use of Cookies while using the website and our services. Please also read our Privacy Policy under which, to the extent stated, you consent to the processing of your personal data.