Permission denied (publickey) issue

I am new to Digital Ocean and I created a droplet using an SSH key with Puttygen. Now it seems I can’t login from the console as it requires a password to login and none of them works, I’ve tried my SSH key passphrase and the root password that has been e-mailed to me as I used the Reset Password function, and always get the Login Incorrect message.

So I used Putty instead and managed to login but I keep running into Permission Denied (publickey) issues, both as root and as the user I created. If I try to log in (ssh user@serverip), I get permission denied. I tried uploading a file on my server both as root and user and permission is denied. I tried to view the authorized keys to grant the necessary permissions as explained on this page ( using the /root/.ssh/authorized_key command but I get permission denied here too.

I am not familiar enough with Linux and the system to understand where these authentication issues come from and what I would need to do to fix them and being able to access my server properly. Any help will be warmly appreciated.

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, @naith7

Can you confirm if you have multiple ssh keys to access more than one droplet or you’ve created your first ssh-key in order to access this droplet?

Keep in mind that you can use the DigitalOcean console in order to access your droplet and check the file permissions and the content of the /root/.ssh/authorized_key file and make sure your key is added to the file as well.

I will recommend you to check the following tutorials:

Regards, Alex