ssh其他机器的Expect脚本
ssh登陆其他机器的Expect脚本
#!/usr/bin/expect -f set user [lindex $argv 0] set ipaddr [lindex $argv 1] set passwd [lindex $argv 2] spawn ssh -l $user $ipaddr expect "password:" send "$passwd\r" interact
或者:
#!/usr/bin/expect -f set user [lindex $argv 0] set ipaddr [lindex $argv 1] set passwd [lindex $argv 2] spawn ssh -l $user $ipaddr expect { "password:" { send "$passwd\r";} } interact
或者:
#!/usr/bin/expect -f set user [lindex $argv 0] set ipaddr [lindex $argv 1] set passwd [lindex $argv 2] spawn ssh -l $user $ipaddr expect "password:" send "$passwd\r" expect eof interact
相关推荐
projava 2020-11-14
WanKaShing 2020-11-12
airfish000 2020-09-11
tryfind 2020-09-14
yegen00 2020-09-10
kkaazz 2020-09-03
风语者 2020-09-02
BraveWangDev 2020-08-19
lichuanlong00 2020-08-15
gsl 2020-08-15
pandaphinex 2020-08-09
yhuihon 2020-08-09
CheNorton 2020-08-02
xiangqiao 2020-07-28
hpujsj 2020-07-26
hpujsj 2020-07-26
sshong 2020-07-19
BraveWangDev 2020-07-19
annan 2020-07-18