Last active
April 8, 2018 01:24
-
-
Save stevemcquaid/8847355e3d0b9fb0f8e818775af42576 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/bash | |
# This script should work on ubuntu 16.04 machines | |
# Enable ssh access for my machines | |
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 | |
} | |
get_public_keys stevemcquaid | |
echo "Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment