在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
shell代码: 复制代码 代码如下: #!/usr/local/bin/expect set PASSWD [lindex $argv 1] set IP [lindex $argv 0] set CMD [lindex $argv 2] spawn ssh $IP $CMD expect "(yes/no)?" { send "yesr" expect "password:" send "$PASSWDr" } "password:" {send "$PASSWDr"} "*host " {exit 1} expect eof 注解: |
请发表评论