Port forwarding more than once
timwood0 "at" pacbell.net
Fri Jan 9 19:53:00 2004
At 01:18 PM 01/09/04, you wrote:
>Well, here's what I want. Hope I made it clear this time.
>I want to create a long SSH tunnel running from my laptop to one server
>and from there to another. Also, I want to forward port x on my machine
>to the 1st server and then to the 2nd server through this tunnel. Is it
>possible to create an SSH tunnel among three (or more) machines ?
The short answer is "yes, but"; the middle machine(s) can run(s) a proxy that will forward SSH connections to/from the neighboring machines. Otherwise, you can log in via SSH to a middle machine, then login via SSH to a subsequent machine, and set up the port forwarding on the middle machine to connect the two SSHs ("incoming" and "outgoing") together. Hokey, but it can be done.
Of course, this does not take into account firewalls, which can remap ports aritrarily; if it's an application-level proxy firewall, like mine, you need a proxy service process as the connection endpoint for SSH.