SSH port-forward Router Telnet sessions

Hi all,

 I have a work Ubuntu server running GNS3 for CCIE R&S study and a Mac at home. I can use my local Mac terminal program at home to telnet to each router console at work through an SSH tunnel with ssh local port forwarding:

ssh -L 2001:localhost:2001 <user>@&lt;work-pc>

then

telnet localhost 2001

But with 10 or so routers running its not practical to create 10 ssh sessions. I am sure this can be done with a single ssh tunnel. I have tried to use ssh dynamic port forwarding and socks proxy but no luck yet. Can anyone explain how it can be done?

Kind Regards,

Nigel

Comments

  • It is really client dependent.  In windows using putty, one can set up all the port forwards in a single SSH session.  So, your problem is finding a client to support this feature that will run on MAC.

  • Thanks for the reply. I have Putty on Mac. If I setup a socks proxy like this:

    ssh –D 1080 <user>@&lt;work-pc>

    then configure Putty to connect to localhost on 2001 and use a socks proxy at localhost on 1080 the connection fails. I couldn't find good documentation on how this might work.

    From: DennisD <[email protected]>
    Reply-To: <[email protected]>
    Date: Monday, 19 August 2013 10:11 PM
    To: <[email protected]>
    Subject: Re: [CCIE R&S General] SSH port-forward Router Telnet sessions

    It is really client dependent.  In windows using putty, one can set up all the port forwards in a single SSH session.  So, your problem is finding a client to support this feature that will run on MAC.




    INE - The Industry Leader in CCIE Preparation

    http://www.INE.com


    Subscription information may be found at:

    http://www.ieoc.com/forums/ForumSubscriptions.aspx
  • You can have multiple port forward entries in one ssh line, e.g.:

    ssh -L 2001:localhost:2001 -L 2002:localhost:2002 -L 2003:localhost:2003 <user>@PC

    You can also put them in your ~/.ssh/config file, so that when you connect to that system, it automatically adds those entries without you having to save them all. Same as saving a session in PuTTy

    On 19/08/2013, at 9:40 PM, nwensley <[email protected]> wrote:

    Hi all,

     I have a work Ubuntu server running GNS3 for CCIE R&S study and a Mac at home. I can use my local Mac terminal program at home to telnet to each router console at work through an SSH tunnel with ssh local port forwarding:

    ssh -L 2001:localhost:2001 <user>@&lt;work-pc>

    then

    telnet localhost 2001

    But with 10 or so routers running its not practical to create 10 ssh sessions. I am sure this can be done with a single ssh tunnel. I have tried to use ssh dynamic port forwarding and socks proxy but no luck yet. Can anyone explain how it can be done?

    Kind Regards,

    Nigel




    INE - The Industry Leader in CCIE Preparation
    http://www.INE.com

    Subscription information may be found at:
    http://www.ieoc.com/forums/ForumSubscriptions.aspx

Sign In or Register to comment.