Report this

What is the reason for this report?

I made a droplet with ssh keys selected, logged in as root perfectly fine, did “adduser demo” and “gpasswd -a demo sudo”. When i try to ssh in as demo@xxx.xxx.xxx i get a “Permission denied (publickey).” but when i try again as root@xxx.xxx.xxx its perfectly fine.



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.

Hi @CrustyWang69

You need to edit the file /etc/ssh/sshd_config and edit/add this line:

PasswordAuthentication yes

And restart sshd with the command sudo service ssh restart

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.