SSH keys: creating and adding
How to generate a key pair, add the public key in the server control panel, why saving reboots the server, and why keys don't work on Windows Server.
Updated August 23, 2026
An SSH key is a pair of files: the private one stays with you, the public one sits on the machine. Unlike a password, it can't be brute-forced.
Create a key pair
The command is the same in Windows Terminal, PowerShell, macOS and Linux:
ssh-keygen -t ed25519 -C "artem@laptop"
When asked about the file, press Enter (the default is ~/.ssh/id_ed25519). You should set a passphrase on the key: if your laptop is stolen, a key without a passphrase gives immediate access to the machine.
Two files will appear:
| File | What it is |
|---|---|
id_ed25519 | Private key. Never share it, never upload it anywhere |
id_ed25519.pub | Public key. This is what you paste into the control panel |
To view the public key:
cat ~/.ssh/id_ed25519.pub
The line looks like this: ssh-ed25519 AAAAC3Nza... artem@laptop.
Add the key in the control panel
Open the machine's control panel at /hosting/vds/m/<id>, the “Access” tab, the “SSH keys” subsection, paste the keys into the field and click “Save keys”.
Saving keys reboots a running machine. Keys are applied by the initial setup at boot, so they wouldn't take effect without a restart. Anything that doesn't survive a reboot will be cut off: open connections, unsaved data, services without autostart. On a production machine, pick your time and edit the list in one go, not one key at a time.
The key list is replaced entirely. Send the full set: if you already had a key from your work computer and you save only the new one, the old one will stop working. An empty field removes all keys.
Format: one key per line:
ssh-ed25519 AAAAC3Nza... artem@laptop
ssh-ed25519 AAAAC3Nza... artem@work
Paste the whole line, including the type at the start and the comment at the end, with no line breaks.
You can specify the key right when ordering at /hosting/vds/new — then it will be added to the machine when it's provisioned, and there'll be no extra reboot.
Windows Server has no SSH keys
The key field applies to Linux machines. We provision Windows Server 2022 and 2025 without an SSH server: you log in over RDP as Administrator with the password from the control panel. A key saved for such a machine won't unlock anything — that's why the order wizard doesn't show a field for it.
How to connect and what to do in the first minutes is covered in the article First login to Windows Server over RDP, and access protection in the article RDP security: port, passwords, restrictions.
Test the login
From a new terminal window, without closing the current session:
ssh root@203.0.113.10
If you weren't asked for a password, the key works. If you were, see the error table below.
To avoid typing the address every time, set up a ~/.ssh/config file.
Disable password login
Only after a successful test:
nano /etc/ssh/sshd_config
PasswordAuthentication no
PermitRootLogin prohibit-password
systemctl restart ssh
If something goes wrong, you'll still have access to the machine through the text console in the control panel — it works independently of SSH.
Common errors
| Symptom | Cause |
|---|---|
| Still asks for a password | The private key was pasted into the control panel instead of the .pub, or the key has the wrong name and the client doesn't pick it up |
UNPROTECTED PRIVATE KEY FILE | Permissions are too broad: chmod 600 ~/.ssh/id_ed25519 |
| The key worked and then stopped | The list in the control panel was overwritten without this key |
| After a reinstall the key no longer works | The machine was rebuilt and the keys didn't make it into it. Open “SSH keys” and save the list again |
Permission denied (publickey) after disabling the password | The key never reached the machine — log in through the panel console and check /root/.ssh/authorized_keys |
Diagnostics with verbose output:
ssh -v root@203.0.113.10
The output shows which keys the client offered and what the server replied.
PuTTY users need the key in its own format — see connecting from PuTTY.