#! /usr/bin/expect -f
set timeout 30
spawn ssh -p 22 -o ServerAliveInterval=30 -o ServerAliveCountMax=10 iwjw@30.0.0.23
expect "Password:*"
send "s8H30lk8w4l)2Ls@2k1d03\n"
interact
#! /bin/sh
ssh -CPfN -o ServerAliveInterval=30 -o ServerAliveCountMax=10 -p 22 -L 127.0.0.1:10000:10.24.29.4:10000 iwjw@114.215.198.2
转载于:https://blog.51cto.com/jueshizhanhun/1840242