Last active
April 2, 2020 22:44
-
-
Save jasonwc/e6e907a8e9abfcf2eb806e910d95baf1 to your computer and use it in GitHub Desktop.
Fix SSH key permissions
This file contains 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
# After adding keys to a new shell | |
# wget -O - https://gist.githubusercontent.com/jasonwc/e6e907a8e9abfcf2eb806e910d95baf1/raw/a0e9241725ba2dd6c541602858abd455ae9bc732/fix-ssh-key.sh | bash | |
eval "$(ssh-agent -s)" | |
ssh-add ~/.ssh/id_rsa | |
echo "Fixing permissions of ssh keys..." | |
chmod 700 ~/.ssh | |
chmod 600 ~/.ssh/id_rsa | |
chmod 644 ~/.ssh/id_rsa.pub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment