Created
September 17, 2012 14:23
-
-
Save jbourassa/3737627 to your computer and use it in GitHub Desktop.
Replace your public key for all users
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
for f in /home/* | |
do | |
if [ -f "$f/.ssh/authorized_keys" ] | |
then | |
sudo sed -i "s|OLD_KEY|NEW_KEY|g;" "$f/.ssh/authorized_keys" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment