Skip to content

Instantly share code, notes, and snippets.

@deadbits
Created April 25, 2019 19:41
Show Gist options
  • Save deadbits/7a2b68e323dd738cd10d45bbf5b659b6 to your computer and use it in GitHub Desktop.
Save deadbits/7a2b68e323dd738cd10d45bbf5b659b6 to your computer and use it in GitHub Desktop.
SSH Setup (because I always forget the permissions and steps somehow)
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa
echo "[~] Generating SSH key ..."
ssh-keygen -t rsa -b 4096 -C "adam@deadbits.org" -f ~/.ssh/id_rsa
echo "[+] Created key at ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub"
echo "[~] Setting SSH file and folder permissions ..."
chmod 700 ~/.ssh
chmod 644 ~/.ssh/authorized_keys
chmod 644 ~/.ssh/known_hosts
chmod 644 ~/.ssh/config
chmod 600 ~/.ssh/id_rsa
echo "[+] Done!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment