Last active
August 29, 2015 03:58
-
-
Save ershad/c1dd1ccb23ab4e07f4a5 to your computer and use it in GitHub Desktop.
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
#!/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