Skip to content

Instantly share code, notes, and snippets.

@ershad
Last active August 29, 2015 03:58
Show Gist options
  • Save ershad/c1dd1ccb23ab4e07f4a5 to your computer and use it in GitHub Desktop.
Save ershad/c1dd1ccb23ab4e07f4a5 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Remove all imported keys
grep -v bigbinary_imported ~/.ssh/authorized_keys > /tmp/authorized_keys
mv /tmp/authorized_keys ~/.ssh/authorized_keys
# Write keys
curl -s http://bigbinary.com/team/ssh_keys.txt | grep "^ssh-rsa" | sed "s/$/\ bigbinary_imported/g" >> ~/.ssh/authorized_keys
echo "Updated SSH keys."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment