赞
踩
A: local host, B: auth host, C: remote host
ssh <userb>@<ipb> -p <portb>
[Enter]<pwdb>
[type :]ssh <userc>@<ipc> -p <portc> [default: 22]
[Enter]<pwdc>
ssh -L <porta>:<ipc>:<portc> <userb>@<ipb> -p <portb>
[Enter]<pwdb>
[open a new terminal]
ssh <userc>@localhost -p <porta>
[Enter]<pwdc>
Note: If you want to put this terminal to background, append the option “-Nf”]
-f means “Requests ssh to go to background just before command execution.”
-N means “Do not execute a remote command.”
if -N omitted, error occurs “Cannot fork into background without a command to execute.” So you have to imply that no cmd is gonna execute. Only pwd is typed in after the port forward cmd.
After this, you continue to type ssh cmd in local terminal.
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。