Created
November 17, 2021 21:53
-
-
Save mpetuska/e4b2c5b28fafa4d254e33ade2e1550d3 to your computer and use it in GitHub Desktop.
Utility script to fix ssh 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
#!/usr/bin/env bash | |
sudo chown -R $USER:$USER ~/.ssh | |
sudo chmod 700 ~/.ssh | |
sudo chmod 600 ~/.ssh/authorized_keys | |
sudo chmod 400 ~/.ssh/id_* | |
sudo chmod 644 ~/.ssh/id_*.pub | |
sudo chmod 600 ~/.ssh/known_hosts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment