#! /usr/bin/expect -f
set timeout 30
spawn ssh -p 22 -o ServerAliveInterval=30 -o ServerAliveCountMax=10 [email protected]
expect "Password:*"
send "s8H30lk8w4l)[email protected]\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 [email protected]
时间: 2024-10-09 21:28:14