Common Issues

SSH: Permission Denied

How to resolve common SSH access errors

Error: Permission denied (publickey,password)

This error indicates credentials were not accepted.

Possible causes and solutions

Wrong password: Verify you're using the correct password. Remember SSH passwords are case-sensitive.

Wrong user:

# Try with root
ssh root@IP

# Or with the correct username
ssh ubuntu@IP
ssh debian@IP

Password authentication disabled: If the server is configured to accept only SSH keys, you can't login with password. Use the private key:

ssh -i ~/.ssh/id_ed25519 root@IP

Error: Connection refused

SSH port is not reachable.

Verify if SSH service is active (from VNC Console in panel):

systemctl status sshd
systemctl start sshd

Verify if firewall blocks SSH port:

ufw status
iptables -L -n | grep 22

Verify SSH is listening on the right port:

ss -tlnp | grep ssh

Error: Connection timed out

Server not responding on SSH port.

  • Firewall blocking the port
  • SSH port was changed
  • Server is unreachable (see Server Unreachable)

Try with correct port if it was changed:

ssh -p NEW_PORT root@IP

Error: Host key verification failed

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

This happens when server was reinstalled or IP was reassigned. The host key changed and SSH alerts you for security.

Solution: delete the old key:

ssh-keygen -R SERVER_IP

# If port is different from 22
ssh-keygen -R [SERVER_IP]:PORT

Error: Too many authentication failures

SSH client tried too many keys. Specify the correct one:

ssh -o IdentitiesOnly=yes -i ~/.ssh/id_ed25519 root@IP

Error: No route to host

Network problem between your computer and the server. Check:

ping SERVER_IP
traceroute SERVER_IP

If ping works but SSH doesn't, the problem is on port 22.


Don't remember password and don't have SSH keys

If you can't access in any way:

  1. Use VNC Console from control panel
  2. If VNC console doesn't work either, start Rescue Mode
  3. Follow the guide: Reset Root Password

Advanced SSH debug

To see what happens during connection:

ssh -vvv root@IP

The detailed output shows exactly where and why the connection fails.

On this page