can't access root using ssh Permission denied (publickey)

August 8, 2017 4.5k views
DigitalOcean Ubuntu 16.04

I going through the tutorial for initial server setup
At step 4 I need to manually install the key, as it said in topic Add Public Key to New Remote User I need add the public key to a special file in the user's home directory, but when trying to access root again from my laptop terminal using ssh root@my_ip_address_domain it showing error Permission denied (publickey), I'm using ubuntu 16.04 and created droplets using ssh.. Sorry if this question is simple, this is my first time using server

  • Some checks:

    • Did you restarted sshd service on your droplet?
    • Did you added your SSH key to your ssh agent through ssh-add ~/.ssh/id_rsa (on your computer)?
  • @Grork yes I already add the ssh key to authorized_keys manually.. it's not work..

2 Answers

From your machine you have to copy content to your droplets ~/.ssh/authorized_keys file

I have the same problem. Did you solve this problem?

  • I'm sorry I can't help you because the next morning I tried again it work and I didn't even change anything..

Have another answer? Share your knowledge.