Last active
April 15, 2020 01:37
-
-
Save dantheman213/6e4d3b27bc90a29aafd6b44379d98214 to your computer and use it in GitHub Desktop.
Reset home permissions
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
sudo chmod -R 777 ~/.ssh # start perms from scratch | |
chmod -v 700 ~/ | |
chmod -v 700 ~/.ssh | |
find ~/.ssh -type f -name "*.pub" | xargs chmod -v 644 | |
find ~/.ssh -type f -name "*.pem" | xargs chmod -v 400 | |
find ~/.ssh -type f ! -name "*.*" | xargs chmod -v 400 | |
find ~/.ssh -type d | xargs chmod -v 700 | |
chmod -v 644 ~/.ssh/authorized_keys | |
chmod -v 600 ~/.ssh/config | |
chmod -v 644 ~/.ssh/known_hosts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment