Created
July 30, 2021 16:05
-
-
Save hising/ad7e7a78fa9bba58e48b152a9300eab5 to your computer and use it in GitHub Desktop.
Grab keys from Github
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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