SSH can't do menage a trois?

Michael O'Donnell mod+gnhlug at std.com
Tue Sep 10 14:16:01 EDT 2002


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...?




More information about the gnhlug-discuss mailing list