my machine crashed i lost my terminal access to the droplet Permission denied (publickey).

April 7, 2018 657 views

how to get the new public and private key for my drop let so that i can access the droplet by terminal

1 Answer

Most likely you just need to load your key into your host machines ssh-agent - For MacOS or Linux you can use the following…

eval `ssh-agent`
ssh-add /path/to/private/key


ssh -i /path/to/private/key username@droplet

  • still giving me Permission denied (publickey).

    • try issuing killall ssh-agent first - if you have multiple keys then it may be trying the wrong ones first which cause it to fail out.

Have another answer? Share your knowledge.