SSH keys beat password-only logins. You create a pair on your PC, install the public key on the server, and connect with the private key.
Steps
On your local machine, generate an Ed25519 key pair (recommended):
ssh-keygen -t ed25519 -C "[email protected]"Copy the public key to the VPS (replace user and IP):
ssh-copy-id -i ~/.ssh/id_ed25519.pub user@YOUR_IPTest passwordless access:
ssh user@YOUR_IPOnce it works, you can harden sshd (PasswordAuthentication no) carefully so you do not lock yourself out.
Tips
- Use a passphrase on the private key.
- Keep an encrypted backup of the key if you disable passwords.
ext step
eed root access and a dedicated IP? Deploy on Xernode.