Dear openssh people,

Here's something to try:

$ echo a >a
$ echo b >b
$ echo c >c
$ scp a b c
$ echo $?
$ cat a b c

Ouch! Also, for comparison:

$ cp a b c
cp: copying multiple files, but last argument `c' is not a directory
Try `cp --help' for more information.
$ rcp a b c
rcp: c: Not a directory.

Note that the cp behavior is specified in SuSv2.
(, "Second synopsi=

Also, and this might be a separate bug, note how openssh exits with
return code of 1.

This was verified using various versions of scp from 3.6.1p2 to 4.2, on =

linux (various versions) and openbsd.

-- =

Bj=F6rn Augustsson Sysadmin IT Systems & Services
Chalmers tekniska h=F6gskola Chalmers University of Technology
"Damn spooky analog crap." -- John Carmack.

openssh-unix-dev mailing list