If you have lost Digital Ocean SSH key and you are unable to login, no worries. Just follow the step-by-step procedure. If need any help, please feel free to comment below.
- Login to Digital Ocean account
- Select your desired Droplet which you want to recover
- Go to Access menu and click Reset Root Password button
- Copy the Password which you received at your e-mail
- Launch Console
- Type username root
- Using right click or CTRL+V paste the password and press Enter
- Digital Ocean will ask to change password, first Enter Current password
- Then, provide a New password
- Re-enter the New password
- Now, you are logged in via Console.
- But, we need to enable password login for the droplet, please enter below commandnano /etc/ssh/sshd_config
- Find the line
- Replace to
- Save the file using command CTRL+O and press Enter key
- Restart the Droplet using reboot commandreboot
- Now, you can login using password in Putty SSH client without providing SSH key.
I hope this helps.