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
nc -zv SERVER_IP 22
Via telnet:
telnet SERVER_IP 22
Test-NetConnection -ComputerName SERVER_IP -Port 22
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
iptables:
iptables -L -n | grep 22
UFW:
ufw status
firewalld:
firewall-cmd --list-all
If SSH port is not open:
ufw allow 22/tcp
ssh -p 2222 root@SERVER_IP
nc -zv SERVER_IP 2222
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.