SSH won’t connect. Before you assume the server is down, work through these checks. Most SSH failures are client-side.

Quick Diagnosis

Run SSH in verbose mode to see exactly where it fails:

  ssh -vvv user@your-server-ip
  

The output tells you where the connection stalls. Match it below.

Common Problems

Connection Refused

  ssh: connect to host x.x.x.x port 22: Connection refused
  
CauseFix
SSH service isn’t runningReboot the server from the client area. If you can access a web console, run sudo systemctl start sshd
Wrong portIf you changed the SSH port, specify it: ssh -p 2222 user@server-ip
Firewall blocking port 22If you have web console access: sudo ufw allow 22/tcp
Server is downCheck status in the client area → ServicesMy Services

Connection Timed Out

  ssh: connect to host x.x.x.x port 22: Connection timed out
  

This means packets aren’t reaching the server at all.

  1. Check the IP. Is it correct? Typos happen
  2. Ping the server: ping your-server-ip. If it doesn’t respond, the server might be down or ICMP is blocked
  3. Try from another network. Your ISP or local firewall might be blocking port 22
  4. Check the server is running. Use the client area to verify status and trigger a reboot if needed

Permission Denied (Password)

  Permission denied (publickey,password).
  
  1. Check username. Are you using the right user? (root, or the non-root user you created)
  2. Check password. Copy-paste from your welcome email. Watch for trailing spaces
  3. Root login disabled? If you set PermitRootLogin no in sshd_config, use your non-root user
  4. Password auth disabled? If you set PasswordAuthentication no, you need SSH keys

Permission Denied (Public Key)

  Permission denied (publickey).
  

Your key isn’t being accepted. Check these in order:

CheckCommand / Action
Right key being offered?ssh -vvv user@server (look for “Offering public key” lines)
Key exists on server?Check ~/.ssh/authorized_keys on the server
File permissions?chmod 700 ~/.ssh && chmod 600 ~/.ssh/authorized_keys
Key format?Make sure you copied the public key (.pub), not the private key
Correct user?The key must be in the target user’s ~/.ssh/authorized_keys, not root’s

Host Key Verification Failed

  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!  @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  

This appears when:

  • You reinstalled the server. The host key changed. Safely remove the old entry:
      ssh-keygen -R your-server-ip
      
  • You’re connecting to a different server on the same IP. Same fix

Connection Drops After Login

You connect but get disconnected immediately or after a few minutes.

CauseFix
Shell misconfiguredTry ssh user@server /bin/bash to bypass the default shell
Server out of memoryReboot from the client area, then check free -h
Idle timeoutAdd to your local ~/.ssh/config: ServerAliveInterval 60
Disk fullServer can’t write to log files. Use web console to free space

Windows-Specific Issues

ProblemFix
ssh not recognisedUse PowerShell or Windows Terminal (not cmd.exe). Or install Git for Windows which includes SSH
Key file permissions warningRight-click the key file → Properties → Security → remove all users except yourself
PuTTY can’t use OpenSSH keysConvert with PuTTYgen: ConversionsImport key → save as .ppk

SSH Config File

Save yourself from typing long commands. Create or edit ~/.ssh/config:

  Host myserver
    HostName 192.168.1.100
    User deploy
    Port 2222
    IdentityFile ~/.ssh/id_ed25519
    ServerAliveInterval 60
  

Now connect with just:

  ssh myserver
  

What to Do Next

Last updated 05 Apr 2026, 00:00 +0200. history

Was this page helpful?