Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: scp protocol error on multiple file copy?



On Thu, 31 Oct 2019 16:46:47 -0000 (UTC), mlelstv%serpens.de@localhost (Michael
van Elst) wrote:

> jdbaker%consolidated.net@localhost ("John D. Baker") writes:
> 
> >  $ scp -p buildhost:'/path/to/{sets/text.tgz,kernel/netbsd-CUSTOM.gz}' .
> 
> >It prompted for the password and then I got:
> 
> >  scp: /path/to/{sets/text.tgz,kernel/netbsd-CUSTOM.gz}: No such file or directory
> 
> 
> % scp fud:'raid{0,1}.label' .
> raid0.label                                   100%  894   250.4KB/s   0.9KB/s  
> raid1.label                                   100%  890   307.0KB/s   0.9KB/s  
> 
> % scp fud:'notthere/raid{0,1}.label' .
> scp: notthere/raid0.label: No such file or directory
> scp: notthere/raid1.label: No such file or directory
> 
> Seems to work.
> 
> However:
> 
> % scp fud:'raid{0,1}.label' .
> foo
> 
> scp is just using ssh to run an scp command on the remote machine and
> parsing the data sent to stdout. In this case I added a 'echo foo'
> to the remote .cshrc file (with tcsh as login shell).
> 
> Also
> 
> % scp fud:'raid{0,1}.label' .
> scp: raid{0,1}.label: No such file or directory
> 
> happens when I change the login shell to /bin/sh (or /bin/ksh) on the
> remote machine because sh and ksh don't understand this syntax.


I see.  I use ksh everywhere as login shell, so that explains the
C-shell-style filename globbing failures.  Odd that it doesn't seem to
be able to cope with ksh filename generation: !(), @(), etc., but simple
sh-style globbing works.

It would be neat if it could be told to run an arbitrary shell, but
that's probably a gaping security hole...

In any event, I wonder what changed to cause the original error I
saw.  The multiple-source-file syntax I illustrated used to work.

-- 
|/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
|\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSD            FreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645


Home | Main Index | Thread Index | Old Index