Can't connect to your server? Fix SSH timeouts and an unreachable server
GoGetSpace Engineering Last tested 8 min readTested onUbuntu 24.04AlmaLinux 9Fedora 45
Short answer
First open your server in the dashboard: it must say Running, not Stopped or Suspended. Then run ping to your server's IP. If ping answers but SSH or your website doesn't, the server is up and a firewall or a stopped service is blocking that port. Open the browser console, check sudo ufw status or sudo firewall-cmd --list-all, and check that the service is running with systemctl status. If ping gets no answer, Reboot the server from the dashboard.
Work through these steps in order. Each step rules out one cause.
1. Check the server in your dashboard
Open Servers and click your server. The status at the top tells you a lot:
The server is up, but a firewall blocks the port, or the service (SSH, Nginx and so on) isn't running. Go to step 3.
No answer
Works
Something blocks ping, but the server is fine. On a new server, ping is allowed.
No answer
Doesn't work
The server is off or stuck, or its network inside is broken. Go to step 3, and if the console shows nothing useful, step 4.
3. Look inside with the browser console
The browser console shows your server's screen, even when SSH and the network are broken. Open the server, click Console, confirm it's you, and sign in with the one-time password, as the browser console guide explains. Then check these, one at a time.
Is a firewall blocking the port?
Bash
$ sudoufw status
If it says Status: inactive, UFW isn't the problem. If it says Status: active and there's no OpenSSH or 22 line marked ALLOW, UFW is blocking SSH. Allow it:
This lists every program waiting for connections. You should see your port, for example 0.0.0.0:22 for SSH or 0.0.0.0:80 for a website. On Ubuntu 24.04 the program shown for port 22 is systemd. That's normal. If it's missing, the service isn't running. Check it and start it:
Bash
$ sudosystemctl status ssh.socket
$ sudosystemctl enable --now ssh.socket
enable --now starts it now and after every reboot. On Ubuntu 24.04, SSH starts through ssh.socket, so use that rather than ssh. On Ubuntu 22.04 and Debian, use ssh instead. For a website, use nginx (or apache2).
Bash
$ sudosystemctl status sshd
$ sudosystemctl enable --now sshd
enable --now starts it now and after every reboot. For a website, use nginx (or httpd).
If a service won't start, sudo journalctl -u nginx -n 30 (with the service's name) shows why.
Is the disk or memory full?
Bash
$ df -h /
$ free -m
A disk at 100% stops apps from saving data. In our test, SSH logins and Nginx still worked with a full disk, so a full disk alone rarely makes the server unreachable, and you can still log in and free up space. Very low available memory makes the server slow or stops apps. sudo journalctl -k | grep -i 'out of memory' shows if the system had to stop a program.
Can the server reach the internet?
Bash
$ ping -c31.1.1.1
If this fails too, the network inside the server is broken, often after a change to its network settings. Undo the change, or try a Reboot (step 4). Reinstall the server only as a last resort. Reinstalling deletes everything on the disk.
After each fix, run the port test from step 2 again. If it works now, you've found the problem.
4. Restart the server
If the console shows a frozen screen, or you can't find the cause, restart the server from the dashboard:
Click Reboot. The server restarts cleanly, and SSH is back in under 30 seconds.
If Reboot doesn't work, click Force off, then Start. Force off is like pulling the plug, so programs can lose data they hadn't saved yet. Use it only when the server is stuck.
A reboot also clears firewall changes that weren't saved permanently, such as a firewalld rule added without --permanent.
What the error message means
Message
What it means
Connection timed out (on a Mac: Operation timed out)
Nothing answered. A firewall is dropping the connection, the service isn't running, or the server is off. On our servers, a stopped service also shows as a timeout, not as Connection refused. Use steps 2 and 3 to tell them apart. Without a time limit, ssh can wait over 2 minutes before it shows this.
No route to host
Usually firewalld on the server is rejecting the connection. It shows up right away, not after a wait. Allow the service (step 3).
Connection refused
Something answered and refused the connection. We didn't see this on our servers in testing: a stopped service or closed port timed out instead. Check the IP address and port, then try without your VPN or from another network, because a device between you and the server may be sending it.
To stop ssh waiting minutes for an answer, give it a time limit:
Bash
$ ssh-o ConnectTimeout=10user@server-ip
Still stuck?
Open a ticket and tell us your server's name, what you tried, and the exact error message. The results of ping and the port test from step 2 help us find the problem faster.
Frequently asked questions
Ping doesn't answer, but my website works. Is something wrong?
No. Some firewalls block ping on purpose. If your website or SSH works, the server is fine. On a new server, ping is allowed.
Why does my server not answer right after I start it?
It needs time to boot. In our tests, SSH answered about 25 seconds after Start and under 30 seconds after Reboot.
Can you fix my server's firewall for me?
We can't log in to your server, because it's yours and only you have the keys. Use the browser console: it works even when the firewall blocks everything.
Does a reboot delete my data?
No. Reboot, Stop and Start keep everything on the disk. Force off can lose data that programs hadn't saved yet. Only Reinstall and Destroy delete what's on the disk.
Bash
$ nc -zv-w5server-ip22
If the port works, it says open or succeeded. If it doesn't, it says timed out (on a Mac, Operation timed out).
If it says Status: inactive, UFW isn't the problem. If it says Status: active and there's no OpenSSH or 22 line marked ALLOW, UFW is blocking SSH. Allow it:
$ sudosystemctl status ssh.socket
$ sudosystemctl enable --now ssh.socket
enable --now starts it now and after every reboot. On Ubuntu 24.04, SSH starts through ssh.socket, so use that rather than ssh. On Ubuntu 22.04 and Debian, use ssh instead. For a website, use nginx (or apache2).
Bash
$ sudosystemctl status sshd
$ sudosystemctl enable --now sshd
enable --now starts it now and after every reboot. For a website, use nginx (or httpd).