[Bug 813] Scp to s Solaris 9 box gives "exit status 1" although file is delivered.

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Sun Mar 21 18:15:15 EST 2004


http://bugzilla.mindrot.org/show_bug.cgi?id=813

dtucker at zip.com.au changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID



------- Additional Comments From dtucker at zip.com.au  2004-03-21 18:15 -------
Hmmm.  Firstly, it looks like SunSSH's ssh doesn't collect the return code properly.

$ uname -a
SunOS sol9box 5.9 Generic_112233-11 sun4m sparc SUNW,SPARCstation-5
$showrev -p |grep 113273
Patch: 113273-05 Obsoletes:  Requires:  Incompatibles:  Packages: SUNWsshdu
$ /usr/bin/ssh -V
SSH Version Sun_SSH_1.0, protocol versions 1.5/2.0.
$ /usr/bin/ssh sol9box /usr/bin/true; echo $?
255

Because of this, I'm using "ssh" from OpenSSH 3.8p1 for the rest of these tests.

$ dd if=/dev/zero of=tmpfile bs=1k count=5
$ for i in `seq 1 30`; do /usr/local/bin/ssh <tmpfile sol9box "cat >/dev/null;
exit 0" ; echo -n "$? "; done; echo
255 0 255 0 255 0 255 255 0 0 0 255 0 255 0 0 255 0 255 0 255 0 255 255 0 255 0
255 0 255

For comparison, here's the output of the same command on Solaris 8 with
OpenSSH's sshd (3.7.1p2):
$ for i in `seq 1 30`; do /usr/local/bin/ssh <tmpfile sol8box "cat >/dev/null;
exit 0" ; echo -n "$? "; done; echo
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Conclusion: SunSSH's sshd does not always provide correct return codes when
dealing with input to non-interactive commands.  Report the bug to Sun, or
install OpenSSH.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.




More information about the openssh-bugs mailing list