/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
______________________________________
原文:https://www.cnblogs.com/sxgaofeng/p/12373858.html