Skip to content

Instantly share code, notes, and snippets.

@niiku-y
Created December 8, 2018 12:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niiku-y/9bd8bb254bc806f9ab06711046032493 to your computer and use it in GitHub Desktop.
Save niiku-y/9bd8bb254bc806f9ab06711046032493 to your computer and use it in GitHub Desktop.
#!/bin/bash
# copy_keyconf.sh
HOSTLIST="master01 master02 master03"
for h in $HOSTLIST
do
scp ~/.ssh/authorized_keys ubuntu@${h}:/home/ubuntu/.ssh/authorized_keys
scp ~/.ssh/config ubuntu@${h}:/home/ubuntu/.ssh/config
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment