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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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