Can't Connect to Your VPS? Fix SSH Timeout & Refused Errors
Can't reach your VPS over SSH? Fix timeouts, connection refused and permission denied by checking status, IP, firewall, port and the panel's consoles.
If you cannot connect to your VPS, work through four checks in this order: is the server Online in the panel, are the IP, user and password correct, does the web console connect, and is something blocking the port (the firewall inside the server, the panel's Firewall or your own network). The error message tells you which one. This guide explains each error and how to fix it.
Quick diagnosis
Open the panel, click your server and use the consoles to find out where the problem is:
| What happens | Most likely cause |
|---|---|
| The web console (Console, Terminal (SSH)) works, but your computer cannot connect | Your network, your IP is blocked, or the wrong IP/port. |
| Neither works, but the Screen console shows the server | SSH is stopped or blocked by a firewall inside the server. |
| Not even the Screen console shows a working system | The system is frozen or not booting. |
Step 1: Check the server status
Open VPS & VDS in the panel and look at the status next to the name of your server.
- Off: click Start. See Restart, stop and force stop your VPS.
- Installing: the server is still being set up or reinstalled. Wait a few minutes.
- Suspended: usually an unpaid invoice. Pay it and the server comes back within minutes.
- Rescue mode: the server started from a repair system, not from its own disk. Exit rescue mode to use it normally.
- A notice about Maintenance: a planned or ongoing maintenance on the machine that runs your server. You will receive an email when it is done.
- Online: continue with the next steps.
Step 2: Check the IP, user and password
- Click Connect at the top of your server.
- Compare the IP address with the one you are using. A typo is the most common cause of timeouts.
- Use the User shown there (
rooton Linux) and click Show next to Password to copy it.
If you changed the password from inside the server with passwd, the panel still shows the old one. Set a new one from the panel: How to change your VPS root password.
On a Windows server you do not use SSH: connect with Remote Desktop to the IP on port 3389 (see Connect to a Windows VPS with Remote Desktop).
Step 3: Read the error
| Error | What it means | What to do |
|---|---|---|
Connection timed out or Operation timed out |
Nothing answered. The server is off, the IP is wrong, or a firewall drops the traffic. | Steps 1, 2, 5 and 6. |
Connection refused |
The server answered, but nothing is listening on that port. | Check the port and that SSH is running (step 4). |
Permission denied, please try again |
Wrong user or password, or password login is disabled. | Step 2. Check How the console logs in. |
Permission denied (publickey) |
The server only accepts keys and yours does not match. | How to add an SSH key to your VPS. |
Too many authentication failures |
Your computer offered too many keys. | ssh -o IdentitiesOnly=yes -i ~/.ssh/your_key root@IP |
REMOTE HOST IDENTIFICATION HAS CHANGED |
The server has a new fingerprint, usually after a reinstall. | ssh-keygen -R IP, then connect again. |
Connection closed by remote host right after connecting |
Something closed it: a ban from fail2ban or from the panel firewall, or SSH limits. | Steps 5 and 6. |
No route to host or Network is unreachable |
The problem is on your side or on the way. | Step 7. |
Step 4: Use the panel consoles
The consoles do not depend on your home or office network.
- Open the Console tab and choose Terminal (SSH). If it connects, the server and SSH work and the problem is between your computer and the server. If it shows an error, read it: it tells you whether the user or credential is wrong, or whether it could not reach the port.
- If the web terminal fails, choose Screen. You see the server like a monitor. See VPS VNC console.
- In the Screen console, log in and check SSH:
systemctl status ssh
sudo ss -tlnp | grep sshsystemctl status sshd
sudo ss -tlnp | grep sshdIf the service is stopped, start it with sudo systemctl start ssh (Ubuntu and Debian) or sudo systemctl start sshd (AlmaLinux and Rocky). The ss output shows the port it listens on. If it is not 22, use -p (ssh -p 2222 root@IP) and set the same port in How the console logs in.
Step 5: Check the firewall inside the server
From the Screen console, check whether a firewall blocks SSH:
sudo ufw status verbose
sudo ufw allow 22/tcpsudo firewall-cmd --list-all
sudo firewall-cmd --permanent --add-service=ssh
sudo firewall-cmd --reloadIf your own address was banned by fail2ban, remove the ban:
sudo fail2ban-client set sshd unbanip YOUR_PUBLIC_IPStep 6: Check the panel Firewall
Open Firewall in the left menu and choose your server.
- Strict mode with no open ports: in the Overview tab, if the level is Strict, only ports listed in Open ports receive traffic. Open port 22 (or your SSH port) or switch back to Balanced. See How to open a port in your VPS firewall.
- Your IP is blocked: in the Lists tab, check Blocked. If your IP is there, remove it. Then add it to Always allowed with Add my current IP so the filters never block you.
- SSH guard: it stops bots, but a few failed logins in a row can look like a bot. Adding your IP to Always allowed avoids it.
- Your SSH is on another port: tell the firewall in Rules, under Where your services listen.
Step 7: Check your side
- Try from another network, such as your phone's hotspot. Some offices, schools and public Wi-Fi networks block port 22.
- Turn off any VPN or proxy and try again, or turn it on if your IP is whitelisted somewhere.
- Test whether the port is reachable:
nc -vz 203.0.113.10 22Test-NetConnection 203.0.113.10 -Port 22- Run SSH in verbose mode to see where it stops:
ssh -vvv [email protected].
Step 8: Restart or ask for help
If the Screen console shows a frozen system, try Restart and, if it does not respond, Force stop and Start. If the disk has a problem and rescue mode is available for your server, use rescue mode. Still stuck? Open a ticket from the panel and include your server name, the exact error, when it started, what you already tried and, if you can, the output of ssh -vvv. That saves several back-and-forths.
FAQ
Why do I get "Connection timed out" when I connect to my VPS?
Nothing answered. Check that the server is Online, that the IP is right, and that no firewall (inside the server, in the panel or in your network) drops port 22.
Why do I get "Connection refused"?
The server is reachable, but nothing is listening on that port. SSH might be stopped, or it uses a different port.
My VPS is Online but I can't SSH. What now?
Open the web console. If it works, the problem is between your computer and the server. If it fails, use the Screen console to check that SSH is running and that the firewall allows it.
Does ping tell me if my VPS is up?
Not reliably. A server can be running and still not answer ping. Test the port instead, with nc -vz IP 22 or Test-NetConnection IP -Port 22.
Can I lose my data while troubleshooting?
Not with these steps. Restart, Screen console and rescue mode do not erase your files. Only reinstalling the operating system erases the disk.
Related articles
- How to connect to your VPS via SSH
- VPS web SSH console
- VPS VNC console
- How to open a port in your VPS firewall
- How to change your VPS root password
Prefer a server with DDoS protection included and consoles right in the panel? See our VPS plans.