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_keysOr use the ssh-copy-id utility (Linux/macOS):
ssh-copy-id -i ~/.ssh/id_ed25519.pub username@server_ipSetting correct permissions
SSH requires strict permissions on the .ssh directory and authorized_keys file:
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keysAdding a key via the Customer Portal
- Log in to the Customer Portal.
- Navigate to your cloud server's page.
- Find the SSH Keys section.
- 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_ipIf successful, you will be logged in without being prompted for a password.