Add an SSH Key to Your VPS
SSH keys let you connect to a VPS without typing the account password on every login.
A key pair contains:
- a private key, which stays on your computer.
- a public key, which you add to FreshPerf or the VPS.
Never share your private key.
1. Generate an SSH key
On Windows, macOS or Linux, open a terminal and run:
ssh-keygen -t ed25519
Press Enter to use the suggested location.
Protecting the private key with a passphrase is recommended.
The files are usually created as:
~/.ssh/id_ed25519 ~/.ssh/id_ed25519.pub
The .pub file is the public key.
2. Save the public key in FreshPerf
- Open the client area.
- Click SSH Keys in the left-hand menu.
- Click Add a key.
- Give the key a name.
- Paste only the public key.
- Confirm.
Only public keys are stored in the client area.
You can reuse a saved key when creating a new VPS.
3. Add the key to an existing VPS
If the VPS already exists, first connect with your password.
On Linux or macOS, run:
ssh-copy-id root@IP_ADDRESS
If ssh-copy-id is unavailable, manually copy the contents of:
~/.ssh/id_ed25519.pub
into the remote file:
/root/.ssh/authorized_keys
Then check permissions:
chmod 700 /root/.ssh chmod 600 /root/.ssh/authorized_keys
4. Test the connection
From your computer:
ssh root@IP_ADDRESS
If everything is configured correctly, SSH automatically uses the key.
5. Disable SSH password login (advanced)
Only do this after confirming that key authentication works.
You can adjust password authentication in /etc/ssh/sshd_config, then reload the SSH service.
Keep an active session while changing SSH settings so you do not accidentally lock yourself out.