Dear openssh people,

Here's something to try:

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

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.
(http://www.opengroup.org/onlinepubs/...99/xcu/cp.html, "Second synopsi=
s")

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.

/August.
-- =

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
openssh-unix-dev@mindrot.org
http://www.mindrot.org/mailman/listi...enssh-unix-dev