Question

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

I going through the tutorial for initial server setup https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-14-04… 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

Subscribe
Share

@Grork yes I already add the ssh key to authorized_keys manually… it’s not work…

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)?

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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

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