Skip to main content

Apply SSH Keys

After adding SSH keys to the control panel, you need to apply them to specific server instances to use key-based login.

Apply During Purchase

When purchasing a new instance, you can select SSH keys in the configuration page:

  1. During the purchase configuration step
  2. Find the SSH Key option
  3. Select your previously added key
  4. The key will be automatically deployed after purchase

Select SSH Key at Purchase

Apply to Existing Instances

For existing instances, you can select SSH keys when reinstalling:

  1. Go to the Reinstall OS page
  2. Select an OS template
  3. Check the SSH keys to apply
  4. Keys will be deployed after reinstallation
info

Applying SSH keys to existing instances requires a system reinstall. If you don't want to reinstall, deploy keys manually.

Manual Key Deployment

To add keys without reinstalling:

# Method 1: Using ssh-copy-id (recommended)
ssh-copy-id -i ~/.ssh/id_ed25519.pub root@your_server_ip

# Method 2: Manual
ssh root@your_server_ip
mkdir -p ~/.ssh
chmod 700 ~/.ssh
echo "your_public_key_content" >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys

Verifying Key Login

After deployment, test key login:

ssh root@your_server_ip

If configured correctly, you'll log in without entering a password.

tip

After confirming key login works, we recommend disabling password login for better security.

Troubleshooting

Key login failing?

Check the following:

  1. ~/.ssh/authorized_keys file permissions should be 600
  2. ~/.ssh directory permissions should be 700
  3. SSH config allows key login:
    grep "PubkeyAuthentication" /etc/ssh/sshd_config
    # Should be yes

Next Steps