SSH Tunnelling
I just setup a SSH tunnel from my box to a distant server. It worked fine, with one minor problem.
When I first tried the tunnel, I would get timeouts on the client, and this message on the server session:
What I didn't realize is that in the command
When I first tried the tunnel, I would get timeouts on the client, and this message on the server session:
channel 3: open failed: connect failed: Connection timed out
What I didn't realize is that in the command
ssh -TCN -L 1234:baz.bar.com:2345 foo@baz.bar.com
, the first 'baz.bar.com' is relative to the host machine, not the client. As a result, the command connected to the server, but the port forwarding didn't work because the server didn't know about baz.bar.com. Using ssh -TCN -L 1234:localhost:2345 foo@bar.com
did the trick, since the server did know about localhost relative to itself, and the client process connected immediately.