发布时间:2016-04-26 09:56:59
[yangkai@localhost myshell]$ cat test_dh.exp #!/bin/bash/expect -fset ip 192.168.23.128set password 123456set timeout 3spawn ssh root@$ipexpect {"passw" {send "$password\r";exp_continue}#"de password: " {send "$password\r";exp_continue}"root@" {send "df -h /opt\r";exp_continue}}int.........【阅读全文】