Created
May 26, 2021 09:13
-
-
Save memoryleak/a40c23234abf61b8d5d424e6f119a4f9 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
sudo chown -R $USER:$USER $HOME/.ssh | |
# Base line permission | |
sudo chmod -R 0600 $HOME/.ssh | |
# Not sensible | |
sudo chmod -R 0600 $HOME/.ssh/config | |
sudo chmod -R 0600 $HOME/.ssh/authorized_keys | |
# Not sensible, needs to be readable by all | |
sudo chmod -R 0644 $HOME/.ssh/*.pub | |
sudo chmod -R 0644 $HOME/.ssh/known_hosts | |
# SSH folder must be executeable | |
sudo chmod 0700 $HOME/.ssh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment