Skip to content

Instantly share code, notes, and snippets.

@techie2000
Last active May 5, 2023 19:20
Show Gist options
  • Save techie2000/7804ffbdce36999141da82c07c1d7717 to your computer and use it in GitHub Desktop.
Save techie2000/7804ffbdce36999141da82c07c1d7717 to your computer and use it in GitHub Desktop.
Secure ssh related files an folder
#!/bin/bash
find $HOME/.ssh/ -type f -exec chmod 600 {} \;; find .ssh/ -type d -exec chmod 700 {} \;; find .ssh/ -type f -name "*.pub" -exec chmod 644 {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment