WOGONG blog wiki read

expect

#!/usr/bin/expectset timeout 60
spawn /usr/bin/ssh -D 本地端口 -g 用户名@服务器
expect {
"password:" {
send "密码\r"
}
}
interact {
timeout 60 { send " "}
}


Published 2015-06-17 00:00:00 +0800
Updated 2018-04-18
Link: