摘要: #!/usr/bin/expect set ip '192.168.4.5' set pwd '123456' set timeout 30 spawn ssh root@$ip expect { "yes/no" {send "yes\r";exp_continue} "password:" {send "$pwd\r"} } interact # 保持在远程终端 #!/usr/bi... 阅读全文
posted @ 2018-12-31 16:29 Ray_chen 阅读(319) 评论(0) 推荐(0)