Question

Regaining Access to droplet thorugh SSH, after original ~/.ssh directory is gone

Posted February 2, 2021 87 views
Let's Encrypt

Hey, i can access to my droplet through DO console,
in DO/Settings/Security/SSH, there is ssh key with fingerprint,
but my original id_rsa files are lost.

Is there a way, that i can get to droplet from my terminal again?

so far i get

code
$ sudo ssh root@167.xx.xxx.xxx
The authenticity of host '167.xx.xxx.xxx (167.xx.xxx.xxx)' can't be established.

ECDSA key fingerprint is SHA256:zxczxczxczxczxczxczxcx
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '167.xx.xxx.xxx' (ECDSA) to the list of known hosts.
root@167.xx.xxx.xxx: Permission denied (publickey).

Thank You

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.

×
3 answers

Hi there @sobeit2020,

Yes, you can regain access to your Droplet by following the steps from this page here:

https://www.digitalocean.com/docs/droplets/resources/lost-ssh-key/

Let me know how it goes.
Regards,
Bobby

Hello, @sobeit2020

You can create a new pair of ssh-keys and then upload them to the droplet.

You can check these two articles:

Hope that this helps!
Regards,
Alex

Works, thanks for great support

Submit an Answer