ssh tunnel trickery 

Newsgroups: comp.security.ssh
> Setup:
> MachA= HomeDSL connected linux box openssh-2.5.2p2-5
> MachB=Internet connected running FreeBSD SSH Version 1.2.21
> MachC=Sparcbox Solaris 2.6 Not internet connected but accessable
>      from MachB via ftp/telnet - no ssh
>
>
>              INTERNET
>            /      |
>          /        |
>   home A/     MachB|
>                 \
>                  \
>                  MachC (NO internet but accesable from MachB
>
> I want to connect to MachC from home (MachA)
> I have root on MachA and MachC
> How can I port forwar?(tunnel?) this connection?
>
> I can ssh either direction from A to B, and I can telnet/ftp from
> Machb to MachC.

Rather than port forwarding, why not just:

A% ssh -t B telnet C

If you really want to use port forwarding:

A% ssh -L 1234:C:23 B
A% telnet localhost 1234

Richard Silverman

documented on: 2000.03.04