Store SSH keys in the vServer Control Panel | Speed-Net

Store SSH keys in the vServer Control Panel

With an SSH key you log in to your vServer without a password and much more securely. You store the public part of the key once in the vServer Control Panel and can then add it to any vServer and any reinstallation.

⏱️ Timeapprox. 10 minutes
📊 DifficultyMedium
🧰 You needAddress and login details of the vServer Control Panel (see welcome email)
ℹ️ Note
An SSH key consists of two parts: the private key, which always stays on your computer, and the public key, which you store on the server.
⛔ Warning
Never share your private key and never paste it anywhere. Only the public key from the file ending in .pub belongs in the panel.
1

Create a key on your computer

  1. On Windows open Terminal; on macOS and Linux open the Terminal program.
  2. Enter ssh-keygen -t ed25519 and confirm the suggestions with Enter. Set a passphrase if you wish.
  3. Display the public key: on Windows with type %USERPROFILE%\.ssh\id_ed25519.pub, on macOS and Linux with cat ~/.ssh/id_ed25519.pub.
  4. Copy the entire line starting with ssh-ed25519.
2

Save the key in the panel

  1. In the vServer Control Panel, click Network › SSH Keys in the menu on the left.
  2. Click Add SSH Key.
  3. Under Name, enter a label, for example office-laptop.
  4. Paste the copied line under Public Key.
  5. Click Add SSH Key.

3

Add the key to a vServer

  1. Open your vServer and click Settings › SSH Keys.
  2. Click the box of the desired key so that it is selected.
  3. Click Use SSH Key.
  4. Restart the server so that the key is applied.

💡 Tip
For a reinstallation, select the key directly under Install › Reinstall OS in Select SSH keys. The server can then be reached by key immediately.

How to check that everything works

Connect with ssh root@IP-address. If you are not asked for the root password (at most for your passphrase), the key works.

⚠️ Important
If you delete a key in the panel, it is also removed from all vServers at the next Stop and Start. Make sure you still have another means of access.

Further help

Stuck? Create a support ticket in the Support Center. We are happy to help.