Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jp
Created October 3, 2014 10:19
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 jp/fde9c478c07fdc9ad7a3 to your computer and use it in GitHub Desktop.
Save jp/fde9c478c07fdc9ad7a3 to your computer and use it in GitHub Desktop.
run ssh command in a loop on an array of IP addresses
array=(
10.0.0.1
10.0.0.2
10.0.0.3
10.0.0.4
10.0.0.5
)
for i in "${array[@]}"
do
ssh root@$i yum install openssl -y
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment