expect 脚本

实现远程执行

/home/dataexa/test/proxy.expect
touch proxy.expect
#!/usr/bin/expect

set timeout 30
spawn ssh dataexa@192.168.1.12
expect "password:"
send "123456\r"
interact

执行 expect proxy.expect
______________________________________

posted on 2020-02-27 19:33  石圪节胡德禄  阅读(123)  评论(0编辑  收藏  举报

导航