Managing SSH Keys
SSH keys provide secure, passwordless authentication to your Linux servers. You can store multiple keys in your account and choose which ones to install on each server.
Storing SSH Keys in Your Account
Your account has a key storage where you can keep all your SSH keys. These keys are not applied to any server automatically – they are simply saved for future use.
- In your client portal sidebar, click Security
- Open the SSH Keys tab
- Click Add new SSH key
- Enter a name for the key (e.g. my-laptop, colleague-alex) and paste the public key in OpenSSH format
- Click Save
You can add as many keys as you need – for yourself, your colleagues, or your automation tools.
Selecting Keys When Creating a New Server
When you create a new server from your VDC service, you can choose which keys to install on it:
- Open your Virtual Data Center service and click Add new server
- Choose a server type and a Linux template
- Find the SSH Key section and select one or more keys from your saved keys, or click Add new key to add one on the spot
- Complete the rest of the form and click Create
The selected keys will be automatically installed on the server during creation.
Adding Keys to an Existing Server
You can add SSH keys to a server that is already running, directly from the client portal.
- Open the server in your client portal
- On the Overview tab, find the Server Information section
- In the Server Information section, find the SSH Keys entry (it shows how many keys are installed) and click Manage
- A panel opens showing two groups:
- Already installed – keys currently on this server, shown as read-only badges
- Available to add – keys from your account that are not yet on this server, shown as checkboxes
- Check the keys you want to add and click Submit
What happens next: the server will be rebooted to apply the new keys. You will see a notification about the reboot in the client portal.
Important – how keys are applied:
- The panel only adds keys. Existing keys on the server are preserved.
- Removing a key via the panel is not supported. To remove a key, see the section below.
Removing a Key from a Server
To remove an SSH key from a running server, you need to do it manually inside the operating system. Connect to the server via SSH and edit the ~/.ssh/authorized_keys file:
nano ~/.ssh/authorized_keys
Delete the line containing the key you want to remove, save the file, and exit. The change takes effect immediately – the next SSH connection using that key will be refused.
Alternative: Adding Keys Manually via SSH
If you prefer to manage keys manually (or want to add a key without rebooting), you can add them directly inside the operating system:
- Connect to your server using password authentication:
ssh root@your_server_ip - Create the
.sshdirectory if it does not exist:mkdir -p ~/.ssh && chmod 700 ~/.ssh - Add the public key:
echo "your_public_key_here" >> ~/.ssh/authorized_keys - Set correct permissions:
chmod 600 ~/.ssh/authorized_keys
Note: Keys added manually inside the OS are not visible in the client portal. They will not be affected when you add keys through the panel.