Open a remote tunnel - SSH

This is a discussion on Open a remote tunnel - SSH ; Hello, I have a question about tunnels in putty. What I want to do is to open a ssh session to PC A from PC B. PC B should open a tunnel to PC C, which is in a network, ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Open a remote tunnel

  1. Open a remote tunnel

    Hello,

    I have a question about tunnels in putty.
    What I want to do is to open a ssh session to PC A from PC B.
    PC B should open a tunnel to PC C, which is in a network, which can
    only accessed from PC B.
    Since PC A canīt connect to PC B directly, PC B has to initialize the
    connection. Is this possible?
    A simple Remote Port tunnel does not solve this problem, if I understood
    correctly.

    That is how I think it should work:

    guess
    PC A is 192.168.1.2
    PC B is 192.168.2.2
    PC C is 192.168.3.2

    PC B has as route to PC A and PC B. The firewall denies access to PC B from
    192.168.1.0 but allows outgoing connections.

    I need a connection on port 3690 to PC C.

    If a connection from PC A to PC B would have been allowed, this would work:
    ssh -L 3690:192.168.3.2 -l root 192.168.2.2 from PC A

    So is there a chance to have an indirect tunnel?

    Thanks for any advises
    Stefan

  2. Re: Open a remote tunnel

    Am Sat, 5 Aug 2006 16:54:10 +0200 schrieb Stefan Kuhn:

    > So is there a chance to have an indirect tunnel?


    Okay, sorry Iīve got it. It is indeed the switch -R make it work.

    So the right command looks like:

    From PC B
    ssh -R 3690:192.168.3.2:3690 192.168.1.2

    Now I can connect from PC A with localhost:3690 and everything works fine.

    Oh what a fine day ;-)

    Greets
    Stefan

+ Reply to Thread