文章列表
#!/usr/bin/expect -f
set password kettle
set timeout 10
foreach server { 25 26 27 29 30 31 168 169 170 172 } {
set ip 10.10.1.$server
spawn ssh kettle@10.10.1.$server
expect {
"*yes/no" { send "yes\r"; exp_continue}
"*password:" { send "$password\r" ...