Report this

What is the reason for this report?

ssh root@server 'Permission denied (publickey)'

Posted on September 21, 2017

SSH authentication works and happens automatically when I log into my server with Putty. However, when I run ssh root@server or ssh new_user@server, after following the tutorial on adding a new user and giving it root permissions, I get ‘permission denied (publickey)’. Should I worry about this, are either of my users secure?



This textbox defaults to using Markdown to format your 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.

Assuming you created the .ssh folder and public key file within your new user, make sure you are referencing the proper private key when you ssh login.

i have the same question how to reslove it

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.