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.pubNever 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_IP3. Sign in
ssh root@YOUR_SERVER_IP4. Turn off password sign-in (recommended)
Once key sign-in works, edit /etc/ssh/sshd_config and set:
PasswordAuthentication noThen 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.