Help center
VPS

Adding an SSH key

Sign in with a key instead of a password, the safer way.

SSH keys are safer than passwords and save you typing one in every time.

1. Create a key (once, on your computer)

macOS, Linux and Windows 10/11 all include OpenSSH:

ssh-keygen -t ed25519 -C "you@laptop"

Press Enter to accept the default location. A passphrase is optional but recommended. Your public key is now in ~/.ssh/id_ed25519.pub. Show it with:

cat ~/.ssh/id_ed25519.pub

Never share the file without .pub; that one is your private key.

2. Add it to your server

Pick whichever fits:

  • When deploying: paste the public key into the SSH key field at checkout.
  • When reinstalling: paste it in the reinstall form (server page โ†’ Maintenance โ†’ Reinstall). Note that a reinstall erases the disk.
  • On a running server: copy it over with
ssh-copy-id root@YOUR_SERVER_IP

3. Sign in

ssh root@YOUR_SERVER_IP

4. Turn off password sign-in (recommended)

Once key sign-in works, edit /etc/ssh/sshd_config and set:

PasswordAuthentication no

Then restart SSH with systemctl restart ssh (Debian/Ubuntu) or systemctl restart sshd (Rocky/Alma). Keep your current session open until you've confirmed a new one works.

Didn't solve it?

Problems on our side are always handled. Hands-on help with your own setup is part of the support plans.

More in VPS