Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@bernardoVale
Created May 14, 2018 13:07
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 bernardoVale/bd988d94440c4c40f55463a3604bd586 to your computer and use it in GitHub Desktop.
Save bernardoVale/bd988d94440c4c40f55463a3604bd586 to your computer and use it in GitHub Desktop.
Quickly exchange keys
hosts=(host1 host2)
for host in "${hosts[@]}"
do
ssh-copy-id -i ~/.ssh/id_rsa.pub a_bvale@$host
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment