Apply for Free VPS

Locked out: regain access to your server

Updated 27 Nov 2026 console ssh access

Get back in after a firewall mistake, a lost key or a forgotten password.

Firewall or SSH setting mistake

Open the browser console, sign in as root with your root password and undo the change:

sudo ufw allow 22/tcp
sudo sshd -t
sudo systemctl restart ssh

Lost SSH key

Sign in at the console with your root password and add a new public key to ~/.ssh/authorized_keys.

Changing the key selection on the server page applies at the next reinstall, which erases the server.

Forgotten root password

Options are:

  1. Sign in with an SSH key, if you added one, and run passwd.
  2. Rescue mode, where the host offers it: mount your disk and add a key or fix the configuration.
  3. Reinstall, which erases everything and sets a new password.
  4. Open a VPS access ticket if none of these is possible.

In rescue mode

lsblk
mount /dev/sda1 /mnt
nano /mnt/root/.ssh/authorized_keys
umount /mnt

Device names differ, so check lsblk first.

Avoid it next time

Keep your root password somewhere safe, add an SSH key, and keep one session open while changing access rules.

Was this helpful?

Report outdated or incorrect information