scp problem

Ben Lindstrom mouring at etoh.eviladmin.org
Wed Apr 14 07:19:28 EST 2004



On Tue, 13 Apr 2004, ANDERSON RUSSELL D (ANDY) wrote:

> RCSID("$OpenBSD: scp.c,v 1.113 2003/11/23 23:21:21 djm Exp $");
> Part of the OpenSSH_3.8p1, SSH protocols 1.5/2.0, OpenSSL 0.9.7c 30 Sep 2003 distribution
>
> Could someone verify this case we found that causes a file to be missed during copying?
>
> Here is the setup to replicate the problem:
>
> On hosta /tmp:
> 	-rw-rw-r--   1 user01 group01       0 Apr 13 10:44 file0
> 	-rw-rw-r--   1 user01 group01       0 Apr 13 10:44 file1
> 	-rw-rw-r--   1 user01 group01       0 Apr 13 10:44 file2
>
> On hostb /tmp:
> 	-rw-rw-r--   1 user02 group02       0 Apr 13 10:44 file0
>
> 	cd /tmp
> 	scp -p hosta:/tmp/file* .
>

Before scp sees it the arguments are expanded by your shell to:

		scp -p hosta:/tmp/file0 .

Thus it will not copy anything else.

scp -p 'hosta:/tmp/file*' .   may be more useful in this case for you.

- Ben




More information about the openssh-unix-dev mailing list