How to add an SSH key to a cloud server

To use an SSH key pair to connect to a server, the public part of the pair must be placed on the server. Refer to the How to Create a New SSH Key Pair article for instructions on how to generate key pairs under Windows, Mac, and Linux.

Adding the key manually via SSH

If you already have access to the server, append the public key to the ~/.ssh/authorized_keys file:

echo "your-public-key-content" >> ~/.ssh/authorized_keys

Or use the ssh-copy-id utility (Linux/macOS):

ssh-copy-id -i ~/.ssh/id_ed25519.pub username@server_ip

Setting correct permissions

SSH requires strict permissions on the .ssh directory and authorized_keys file:

chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys

Adding a key via the Customer Portal

  1. Log in to the Customer Portal.
  2. Navigate to your cloud server's page.
  3. Find the SSH Keys section.
  4. Paste your public key and save.

The key will be injected into the server on the next rebuild or can be added live depending on the portal version.

Verifying access

Test the connection using the private key:

ssh -i ~/.ssh/id_ed25519 username@server_ip

If successful, you will be logged in without being prompted for a password.

On this page