SSH: How to login to DO with public key?

I have a public key set up in DO. I can login using a password using root and a specific user. I have configured the SSH config, and did a restart

permitRootLogin Yes

PasswordAuthentication No

PubKeyAuthentication Yes

I will then get " Permission denied (publickey)." on both root and a specific user.

The only way I can get back into my droplet is through the recovery console.

What am I doing wrong ??

Many 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.

None of this works. 22 articles down, not a single solution to this issue with DO that works.

Hi there @vincej,

In order to log in using an SSH key, you need to use an SSH client like Putty for example.

Here are the steps on how to do that:

If you have a Mac or a Linux laptop, you could use the built-in terminals and follow the steps here:

The web console in your DigitalOcean control panel provides you with direct access to the Droplet which does not go over SSH.

Regards, Bobby