Skip to content

Instantly share code, notes, and snippets.

@jmsalcido
Last active June 5, 2020 23:31
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jmsalcido/c4530e4eeae9df0a39bad3e3dbe17db6 to your computer and use it in GitHub Desktop.
Save jmsalcido/c4530e4eeae9df0a39bad3e3dbe17db6 to your computer and use it in GitHub Desktop.
What to do when your ssh key is deleted from Digital Ocean and you have only SSH access with password.
  1. Digital Ocean console web access. [Important]
  2. cp ~/.ssh/id_rsa.pub ~/key.txt
  3. Dropbox it.
  4. Generate a public share link in dropbox
  5. Get something like this: https://www.dropbox.com/s/{{id}}/file?dl=0
  6. Replace the 0 to 1
  7. Get on Digital Ocean web console
  8. WGET it.
  9. Append it to $HOME/.ssh/authorized_keys cat $HOME/key.txt >> $HOME/.ssh/authorized_keys
  10. be happy
  11. ???
  12. PROFIT!!!1
@jmsalcido
Copy link
Author

you can actually use a gist too...

@jmsalcido
Copy link
Author

and use goo.gl to shorten the url.

@tonymtz
Copy link

tonymtz commented Dec 13, 2017

Better to have your key private, doesnt matter it is the public one :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment