Skip to content

Instantly share code, notes, and snippets.

@stevemcquaid
Last active April 8, 2018 01:24
Show Gist options
  • Save stevemcquaid/8847355e3d0b9fb0f8e818775af42576 to your computer and use it in GitHub Desktop.
Save stevemcquaid/8847355e3d0b9fb0f8e818775af42576 to your computer and use it in GitHub Desktop.
#!/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