An SSH key is a pair of files: a private key that stays on your computer, and a public key you put on the server. Logging in with a key is much safer than a password, and quicker.

1. Make a key on your computer

On Windows (PowerShell), Mac or Linux:

ssh-keygen -t ed25519 -C "you@yourbusiness.in"

Press Enter to accept the default place, and set a passphrase for extra protection. This creates id_ed25519 (private, never share it) and id_ed25519.pub (public).

2. Copy the public key to your server

On Mac or Linux:

ssh-copy-id yourname@YOUR.SERVER.IP

On Windows, show the public key with type $env:USERPROFILE\.ssh\id_ed25519.pub, copy it, then on the server run:

mkdir -p ~/.ssh && chmod 700 ~/.ssh
nano ~/.ssh/authorized_keys      # paste the key on its own line, save
chmod 600 ~/.ssh/authorized_keys

3. Test it

Open a new window and run ssh yourname@YOUR.SERVER.IP. You should get in without your server password (you may be asked for the key's passphrase).

Only when this works, turn off password logins (see Secure a new Linux VPS).

Lost your key?

Use the Console in the VPS control panel to log in and add a new public key to ~/.ssh/authorized_keys.