Cannot login after resetting root password

I am trying to access my server terminal from my new computer. I tried adding an ssh key by following the guide, but I get the Permission denied (publickey) error. I then turned to the browser console but can only use the Recovery Console because the Droplet Console for native-like terminal access has not been set up. Unfortunately I forgot my password so I have had to Reset Root password. I get the email and enter the recovery password, enter that, create a new password. But now its not accepting my new password.

Where do I go from here?

Submit an answer
Answer a question...

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.

Site Moderator
Site Moderator badge
November 7, 2022

Hello there,

Make sure to enter the password without blank spaces and also try to type it manually as copy/paste might not be working.

Once you can access the droplet via the recovery console you can temporarily enable password authentication and then upload your ssh-key. You can later on again disable the password-authentication.


Site Moderator
Site Moderator badge
October 21, 2022

Hi @nicholasjames,

The Recovery Console should be enough for you in this case. You can check this tutorial on how to use it:

Using the Root password should be done in the recovery console and then you can add the proper SSH key or allow PasswordAccess for your Droplet from the sshd_config located in /etc/ssh/sshd_config. If you make any changes there, don’t forget to restart the sshd service:

  1. service sshd restart

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.

Hi @nicholasjames,

I am very sorry for what happened.

I have found a very interesting video that explains the process to follow for How To Reset Your DigitalOcean Droplets Root Password.

Hope that helps you,

Sergio Turpín