linux 自动登录

#!/usr/bin/expect -f


set timeout 60
spawn ssh -D 7070  host
 
expect "password:"
send "xiaobao001\r"




interact


会报找不到expect ,是因用用sh执行,不会解释第一行,而应该把些脚本有执行

猜你喜欢

转载自fuyou001.iteye.com/blog/1537554