Use below hosts file to configure the hosts list:
##############################################################
virl@virl:~$ more test14
9.27.110.221
9.27.110.221
virl@virl:~$
###############################################################
virl@virl:~$ more test
#!/bin/bash
a=1
while [ $a -gt 0 ]
do
sshpass -p test parallel-ssh -h test14 -l test -A "show version"
sshpass -p test parallel-ssh -h test14 -l test1 -A "show version"
sshpass -p test parallel-ssh -h test14 -l test2 -A "show version"
sshpass -p test parallel-ssh -h test14 -l test3 -A "show version"
sshpass -p test parallel-ssh -h test14 -l test4 -A "show version"
sshpass -p test parallel-ssh -h test14 -l test5 -A "show clock"
sshpass -p test parallel-ssh -h test14 -l test6 -A "show clock"
sshpass -p test parallel-ssh -h test14 -l test7 -A "show clock"
sshpass -p test parallel-ssh -h test14 -l test8 -A "show clock"
sshpass -p test parallel-ssh -h test14 -l test9 -A "show clock"
sshpass -p test parallel-ssh -h test14 -l test10 -A "show clock"
sshpass -p test parallel-ssh -h test14 -l test11 -A "show clock"
sshpass -p test parallel-ssh -h test14 -l test12 -A "show clock"
sshpass -p test parallel-ssh -h test14 -l test13 -A "show clock"
sshpass -p test parallel-ssh -h test14 -l test14 -A "show clock"
sshpass -p test1 parallel-ssh -h test14 -l test1 -A "show version"
sshpass -p test2 parallel-ssh -h test14 -l test2 -A "show version"
sshpass -p test3 parallel-ssh -h test14 -l test3 -A "show version"
sshpass -p test4 parallel-ssh -h test14 -l test4 -A "show version"
sshpass -p test5 parallel-ssh -h test14 -l test5 -A "show clock"
sshpass -p test6 parallel-ssh -h test14 -l test6 -A "show clock"
sshpass -p test7 parallel-ssh -h test14 -l test7 -A "show clock"
sshpass -p test8 parallel-ssh -h test14 -l test8 -A "show clock"
sshpass -p test9 parallel-ssh -h test14 -l test9 -A "show clock"
sshpass -p test10 parallel-ssh -h test14 -l test10 -A "show clock"
sshpass -p test11 parallel-ssh -h test14 -l test11 -A "show clock"
sshpass -p test12 parallel-ssh -h test14 -l test12 -A "show clock"
sshpass -p test13 parallel-ssh -h test14 -l test13 -A "show clock"
sshpass -p test14 parallel-ssh -h test14 -l test14 -A "show clock"
done
virl@virl:~$
virl@virl:~$
No comments:
Post a Comment