Skip to content

Instantly share code, notes, and snippets.

@hising
Created July 30, 2021 16:05
Show Gist options
  • Save hising/ad7e7a78fa9bba58e48b152a9300eab5 to your computer and use it in GitHub Desktop.
Save hising/ad7e7a78fa9bba58e48b152a9300eab5 to your computer and use it in GitHub Desktop.
Grab keys from Github
function get_public_keys () {
mkdir -m 700 -p ~/.ssh
for user in "$@"
do
curl -s https://github.com/"$user".keys >> ~/.ssh/authorized_keys
done
chmod 600 ~/.ssh/authorized_keys
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment