fix-permissions-ssh.sh 212 B

12345678910
  1. #!/usr/bin/env bash
  2. set -euo pipefail # bash strict mode
  3. set -euxo pipefail # bash strict mode
  4. chmod go-w "${HOME}"
  5. chmod 700 "${HOME}/.ssh"
  6. chmod 600 "${HOME}/.ssh/authorized_keys"
  7. sudo systemctl restart sshd