Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tonymtz/fce1b7847a4601a15e0cff88624398bb to your computer and use it in GitHub Desktop.
Save tonymtz/fce1b7847a4601a15e0cff88624398bb 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment