scp remote path specification

mouring at etoh.eviladmin.org mouring at etoh.eviladmin.org
Wed Dec 20 14:08:32 EST 2000


On Tue, 19 Dec 2000, Frank Tobin wrote:

> Markus Friedl, at 10:51 +0100 on Tue, 19 Dec 2000, wrote:
> 
>     many people have already problems with
>     	scp hosta:/file1 hostb:/file2
>     expanding to
>     	ssh hosta 'scp /file1 hostb:/file2'
> 
> True, openssh appears really broken when having multiple remote hosts on
> the command line (e.g., it doesn't even appear to do proper name lookups
> on the second host with "scp fqdn:/etc/hosts non-fqdn:hosts"; I haven't
> figured out what the other problems are yet), but that doesn't mean we
> should further cut off the possible of expanded functionality.  If it were
> possible, it surely stands that some are going to want to do:
> 
> scp a:file1 b:file2 c:file3 d:file4 final_host:final_dir/
> 
> If you _ever_ want to do this sort of thing in the future, you need to at
> least let your design account for it.  For example, let the remote-path
> specification be put into the config file, where you can do host-specific
> options, instead of an argument, where it is much more difficult to do so.
> 
> 
Is it supose to work?   Doing the above style scp on 1.2.x ssh.com version
spits back "User Abort!" since the final resting spot of the file is not
local.

However the following works (for OpenSSH and ssh v1.2.x):
scp a:file1  b:file2  dir/  

I would try ssh v2.3.0, but I don't currently have a machine which it's
setup on, but I would expect the same results.

If you run the same test using 'rcp' (I removed the beast off all my
machines years ago) can you succesfully do a: rcp a:file1 b:file2 ?

I suspect that the answer is no.

- Ben






More information about the openssh-unix-dev mailing list