[root@localhost~]# vim server_list.txt
192.168.0.13
192.168.0.12
192.168.0.11
[root@localhost~]# vim shutdown.txt
shutdown -h now
[root@localhost~]# vim remote_shutdown.sh
for i in `cat server_list.txt`
do
plink -l root $i -pw redhat -m /shutdown.txt EOF
y
EOF
done
vim remote_shutdown.sh
plink -l root 192.168.0.12 -pw password1 -m /shutdown.txt
plink -l jane 192.168.0.35 -pw password2 -m /shutdown.txt
plink -l paul 192.168.0.77 -pw password3 -m /shutdown.txt
plink -l root 192.168.0.19 -pw password4 -m /shutdown.txt
(或 plink root@192.168.0.19 -pw password4 -m /shutdown.txt)