expect script

Remote execution

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

set timeout 30
spawn ssh [email protected]
expect "password:"
send "123456\r"
interact

执行 expect proxy.expect
______________________________________

Guess you like

Origin www.cnblogs.com/sxgaofeng/p/12373858.html