Skip to content

Instantly share code, notes, and snippets.

@Anthonykung
Last active October 9, 2021 22:05
Show Gist options
  • Save Anthonykung/1546c11002bd0f6953ab23b3ea32667b to your computer and use it in GitHub Desktop.
Save Anthonykung/1546c11002bd0f6953ab23b3ea32667b to your computer and use it in GitHub Desktop.
Fix SSH Perms
#!/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