SSH can't do menage a trois?

Chris chrisra at concentric.net
Tue Sep 10 14:27:55 EDT 2002


Could you establish an ssh tunnel on C something like

ssh -g -C -L xxxx:L:22 localhost  which allows you to send data to port
xxxx on C and that gets sent to port 22 on L

and the same trick except in reverse for machine R

and then you would just have to modify your scp command to transmit on
port xxxx
with scp -pxxxx


Michael O'Donnell wrote:

> I have three machines:
>
>  - system C(entral) is connected to two LANs.
>  - system L(eft) is on one LAN connected to C.
>  - system R(ight) is on the other LAN connected to C.
>
> L and R have no knowledge of each other.  I can
> easily establish SSH sessions and scp files (inbound
> or outbound) between C and L, or between C and R,
> but it seems that I can't, while operating from C,
> say something like:
>
>    scp L:someFile R:someDirectory
>
> ...because scp doesn't act as a go-between (as I had
> originally expected it to do) but instead constructs
> and transmits another scp command line for execution
> on L, and that command fails because it refers to R
> which, as I said, L doesn't recognize.
>
> I can hack around this in a number of ways (like
> issuing two separate scp commands with the files
> temporarily residing on C's disk, or by spawning a
> tar on L and one on R and pushing the data from one to
> the other via two pipelined ssh's on C, etc, etc) but
> I wonder if there is some more elegant approach...?
>
> _______________________________________________
> gnhlug-discuss mailing list
> gnhlug-discuss at mail.gnhlug.org
> http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss




More information about the gnhlug-discuss mailing list