Skip to content

Instantly share code, notes, and snippets.

Avatar
💻
Working From a Cafe

tonymtz tonymtz

💻
Working From a Cafe
View GitHub Profile
@muratcakmak
muratcakmak / setup.sh
Last active Mar 18, 2022
New Mac Setup Script Raw
View setup.sh
#!/bin/sh
# ___ __ __ ____ _ ____ _
# / _ \| \/ |/ ___( )___ / ___| ___| |_ _ _ _ __
# | | | | |\/| | | |// __| \___ \ / _ \ __| | | | '_ \
# | |_| | | | | |___ \__ \ ___) | __/ |_| |_| | |_) |
# \___/|_| |_|\____| |___/ |____/ \___|\__|\__,_| .__/
# |_|
echo "Creating an SSH key for you..."
@jmsalcido
jmsalcido / gist:c4530e4eeae9df0a39bad3e3dbe17db6
Last active Jun 5, 2020
What to do when your ssh key is deleted from Digital Ocean and you have only SSH access with password.
View gist:c4530e4eeae9df0a39bad3e3dbe17db6
  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