Created
April 25, 2019 19:41
-
-
Save deadbits/7a2b68e323dd738cd10d45bbf5b659b6 to your computer and use it in GitHub Desktop.
SSH Setup (because I always forget the permissions and steps somehow)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eval "$(ssh-agent -s)" | |
ssh-add ~/.ssh/id_rsa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "[~] Generating SSH key ..." | |
ssh-keygen -t rsa -b 4096 -C "[email protected]" -f ~/.ssh/id_rsa | |
echo "[+] Created key at ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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