Last active
October 9, 2021 22:05
-
-
Save Anthonykung/1546c11002bd0f6953ab23b3ea32667b to your computer and use it in GitHub Desktop.
Fix SSH Perms
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
#!/bin/bash | |
# Run this with `sh ./fix-ssh-perms.sh` in any directory | |
chown ${USER}:${USER} ~/.ssh | |
chmod 700 ~/.ssh | |
chmod 600 ~/.ssh/authorized_keys | |
chmod 600 ~/.ssh/* | |
chmod 644 ~/.ssh/*.pub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment