Question

Can't SSH into server as newly created user (Permission denied (publickey)

I followed this guide https://www.digitalocean.com/community/questions/setting-up-a-new-user-using-ssh and I still get the error: Permission denied (publickey)

How can I create a new user inside my Ubuntu droplet with sudo access that I can access via ssh?

Thanks.


Submit an answer


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!

Sign In or Sign Up to Answer

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.

alexdo
Site Moderator
Site Moderator badge
September 21, 2022

Hello @thomasparfitt

Did you upload the ssh-key to the droplet?

You can check our article on How to Upload an SSH Public Key to an Existing Droplet

https://www.digitalocean.com/docs/droplets/how-to/add-ssh-keys/to-existing-droplet/

You can check this article on How to Add/Delete users

https://www.digitalocean.com/community/tutorials/how-to-add-and-delete-users-on-ubuntu-20-04

Regards

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up