Skip to content

Permission Denied (publickey)

SSH stops with:

root@203.0.113.10: Permission denied (publickey).

The server only accepts SSH keys and none of the keys your computer offered match. Work through these causes in order.

The key was added after the server was created

Section titled “The key was added after the server was created”

Only new servers receive workspace keys. If you added the key later, run “Sync SSH Keys” on the instance. Read more in SSH Keys.

“Sync SSH Keys” replaces root’s keys with the workspace keys. Add the missing key to your workspace and sync again.

Workspace keys are installed for root only. To log in as another user, copy the keys to that user as shown in Creating a Sudo User.

Point SSH at the key you added:

Terminal window
ssh -i ~/.ssh/id_ed25519 root@203.0.113.10

In Bitvise, check that “Initial method” is “publickey” and the right “Client key” is selected.

Run SSH with -v to see which keys it offers and how the server answers:

Terminal window
ssh -v root@203.0.113.10

Look for Offering public key lines. If your key is not in the list, SSH cannot find it. Use -i. If it is offered and rejected, the server does not have that public key.

If no key works, use the dashboard terminal:

  1. Head over to the instance list in our panel and open your instance
  2. Open the “Terminal” tab
  3. Log in as root
  4. Add your public key to /root/.ssh/authorized_keys, or fix one of the causes above

If you do not know the root password, hit “Reset Password” in the instance’s “Advanced” menu. Read more in Terminal.