Skip to content
Melinhost

SSH connection errors and fixes

Connection timed out, Permission denied, Host key changed… The causes and step-by-step fixes of the most common SSH errors.

Troubleshooting · 2 min read

If you can’t connect over SSH, the error message tells you why. First get detailed output with the -v flag:

ssh -v root@203.0.113.21

Connection timed out

The server can’t be reached over the network.

  • Check the IP address on My services › Overview.
  • Confirm the server is running; if not, start it.
  • Make sure the firewall isn’t blocking port 22 (or your custom SSH port) (ufw status).
  • On a company or school network outbound port 22 may be blocked; try mobile data.

Connection refused

The server is reachable but nothing is listening on port 22 for SSH, or the port was changed. Try restarting the server and confirm the SSH service runs with systemctl status ssh (sshd on RHEL-based systems). If you can’t get in, reset the root password or open a ticket.

Permission denied (publickey, password)

  • Check the username and password; nothing shows on screen while you type a password. You can copy it with Reveal in the panel and paste it.
  • If you use a key, offer the right one: ssh -i ~/.ssh/id_ed25519 root@IP.
  • If the server has PasswordAuthentication no, only keys work; make sure yours is in authorized_keys.
  • After too many failed attempts your IP may be temporarily banned (Fail2ban); wait a few minutes.
  • If you forgot the password, reset the root password.

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED

The server’s fingerprint doesn’t match the one saved on your computer. If you reinstalled the server this is expected. If there is no other explanation, remove the old entry and reconnect:

ssh-keygen -R 203.0.113.21
If you did not reinstall the server, take this warning seriously and verify the fingerprint through another channel (for example via our support team).

The connection opens but drops straight away

  • The server may be out of memory or disk; check its status in the panel and restart it.
  • If it drops after being idle for a while, set ServerAliveInterval 60 in your client.

If you locked yourself out

If you misconfigured the firewall or broke the SSH settings, the quickest fix is to restore a snapshot; otherwise open a ticket.

Can’t find what you’re looking for?

Our support team is ready to answer your question. Open a ticket or write to us.

Cookie preferences

We use cookies required for the site to work. Analytics and marketing cookies are enabled only with your consent. Cookie Policy