Last active
December 27, 2015 02:49
-
-
Save huksley/7255337 to your computer and use it in GitHub Desktop.
Copy all your public keys to remote host
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/sh | |
# Synopsis: Copy all your public keys to remote host, enabling public key authentication on remote host | |
HOST=$1 | |
if [ "$HOST" = "" ]; then | |
echo Usage: $0 \<hostname\> | |
exit 1 | |
fi | |
for N in `ls $HOME/.ssh/id_*.pub`; do | |
ssh-copy-id -i $N $HOST | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment