[plug] ssh tunnel - two way street?

James Devenish devenish at guild.uwa.edu.au
Fri May 30 11:18:33 WST 2003


In message <1054263706.2937.7.camel at latte.internal.itmaze.com.au>
on Fri, May 30, 2003 at 11:01:46AM +0800, Onno Benschop wrote:
> When I create an ssh tunnel between two machines, so that a program on
> machine A, connects to a port on machine A and the information ends up
> on a port on machine B, the information flows back from the application
> on machine B, over the tunnel, back to the application on machine A.
> 
> What I want to know is, can machine C on the same network as machine B,
> connect to the end tunnel port on machine B and end up back at machine
> A?

Having just sent my previous e-mail, I suppose I didn't answer the
question quite right for what you wanted to do. I thought you wanted two
tunnels, but if I re-interpret your question then perhaps you only need
one.

 - If you just want a TCP port on B to listen for a connection and then
   tunnel back to a daemon listening on A, then you can use OpenSSH's -L
   or -R options (use a different one depending on whether you invoke
   the ssh command line utlity on A or B).

 - If you want a programme on A to connect to a port on A and a
   programme on C to connect to a port on C and for both of those to
   find themselves connected to each other via B, then you need
   something more complicated (which is what I was suggesting before).




More information about the plug mailing list