Skip to content

Instantly share code, notes, and snippets.

@CodeArtha
Last active April 17, 2021 21:30
Show Gist options
  • Save CodeArtha/a5b0f2501550f0c1f5d9b195cf23a45d to your computer and use it in GitHub Desktop.
Save CodeArtha/a5b0f2501550f0c1f5d9b195cf23a45d to your computer and use it in GitHub Desktop.
script to automatically set the right permission to the ssh-keys
#!/usr/bin/env bash
chmod 700 ~/.ssh
chmod 600 ~/.ssh/*
chmod 644 ~/.ssh/authorized_keys
chmod 644 ~/.ssh/known_hosts
chmod 644 ~/.ssh/config
chmod 644 ~/.ssh/*.pub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment