Answer the question
In order to leave comments, you need to log in
What software do you use to go to a hundred servers via ssh and execute the desired command?
subject
It is the execution of the command as an action, not a description, that is of interest, so puppet and cfengine are not suitable.
Answer the question
In order to leave comments, you need to log in
#!/bin/bash
for i in {001..250}
do
SRVN="srv${i}.local"
echo ${SRVNN}
ssh ${SRVNN} "rm -rf /"
done
Or you can add & after ssh so that the loop does not wait for a response, but runs everything almost in parallel.
I don’t use it myself, but judging by the description, dsh will suit you
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question