SSH keys are safer than passwords. You keep a private key on your computer and put the public key on the server.
Create a key (on your computer)
- Open a terminal.
- Run: ssh-keygen -t ed25519 -C "you@example.com"
- Press Enter to save in the default place. Set a passphrase.
- Your public key is in ~/.ssh/id_ed25519.pub. Never share the file without .pub.
Add the key to the server
- Easy way: ssh-copy-id root@YOUR_SERVER_IP
- Manual way: log in, then run mkdir -p ~/.ssh and paste the contents of the .pub file into ~/.ssh/authorized_keys. Set permissions: chmod 700 ~/.ssh and chmod 600 ~/.ssh/authorized_keys.
- If the VirtFusion panel lets you save an SSH key, you can add it there for new installs or reinstalls.
Test Open a second terminal and run ssh root@YOUR_SERVER_IP. It should not ask for the account password (it may ask for the key passphrase).
Turn off password login
- Edit /etc/ssh/sshd_config.
- Set PasswordAuthentication no.
- Restart SSH: systemctl restart sshd (or ssh).
Keep your first session open until you confirm the key works.
Lost your key? Use the console in the VPS panel to log in with a password and add a new key.
Still need help?
Ask Zeni in the chat bubble, or open a support ticket. We answer 24/7.