Re: [ILUG] scp host routing?

From: Padraig Brady (padraig.brady at domain corvil.com)
Date: Wed 04 Sep 2002 - 13:11:56 IST


Stephen Shirley wrote:
> On Wed, Sep 04, 2002 at 12:12:44PM +0100, kevin lyda wrote:
>
>>let's say i have three hosts axe, bat and cat. i want to copy moo.txt
>>from axe to cat but i have to "hop" across bat. in uucp i'd just do:
>>
>> uucp moo.txt bat!cat!moo.txt
>>
>>anyone know if this is possible in an ssh client? openssh doesn't seem
>>to have this.
>>
>>kevin
>
> Esaiest way:
> tar cf - files | ssh bat ssh cat tar xvf -

cat was problably the most confusing hostname to use :-)
Anyway in general anything passed after the hostname
is run on the remote host.

This is a very efficient way to copy a tree
from one place to another.

tar cjf - dir1 | ssh host "cd dir2; tar xjf -"

for a local LAN, this would probably be quicker:

tar czf - directory | ssh -c blowfish host "cd dir; tar xzf -"

Padraig.



This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:18:38 GMT