Skip to content

Instantly share code, notes, and snippets.

@dantheman213
Last active April 15, 2020 01:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dantheman213/6e4d3b27bc90a29aafd6b44379d98214 to your computer and use it in GitHub Desktop.
Save dantheman213/6e4d3b27bc90a29aafd6b44379d98214 to your computer and use it in GitHub Desktop.
Reset home permissions
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