Locked out of SSH
Can't log in over SSH? Get back in through the browser console, then fix the password, key, firewall or setting that blocked you.
SSH can stop letting you in for a few reasons: a forgotten password, a key that is no longer on the server, a firewall rule, or an SSH setting changed on the server. The browser console gets you in whichever it is, because it doesn't use the network.
Get in through the console#
- Open the server from Servers and choose the Console tab.
- Log in as root with your password.
- If you don't have the password, press Reset password under the console, then log in with the new one.
See Use the browser console for the console's buttons.
Then find what blocked you#
- A firewall rule. On the Networking tab, under Firewall, check that a rule allows port 22 from where you are. See Set up the firewall.
- Your key. Check Keys on this machine in the Connect card. To add the one you use, see Add and revoke SSH keys.
- A changed host key. After a rebuild, your computer warns that the server's host key has changed and refuses to connect. That is expected: remove the old entry, then connect again.
ssh-keygen -R 203.0.113.10- The SSH settings on the server. From the console, check
/etc/ssh/sshd_configand anything in/etc/ssh/sshd_config.d/, then restart SSH:
Ubuntu / Debian
systemctl restart sshAlmaLinux / Rocky
systemctl restart sshdStill stuck? Open a ticket and say which guide you followed.