OpenSSH solaris: bad return code after exec of remote command

Nicolas Williams Nicolas.Williams at ubsw.com
Thu Oct 11 06:37:35 EST 2001


On Wed, Oct 10, 2001 at 11:09:17AM +0100, Matthew Seaman wrote:
> Damn.  Synchronicity or what.  We've just been struggling with a similar
> problem and I was just about to post a bug report when I saw this
> message.
> 
> What we've been able to determine:
> 
> You'll always get a failure exit code from ssh if the following three
> things are true:
> 
> i) SSH2 protocol
> ii) Using a forced command
> iii) No stdin on the client --- ie. using `ssh -n' or
> `ssh host commands </dev/null'.

Note that the "or" clause of (iii) above conflicts with (ii) -- can you
clarify?

I've run into compiler bugs often lately. Check that as well -- i.e.,
rebuild using a different compiler, see what happens.

But, I'm testing this now, and here's what I found:

 - ssh -n -2 host exit $(print $((RANDOM % 91)) |tee /dev/tty) ; echo $?

   (with forced command="exit $SSH_ORIGINAL_COMMAND" and RSA keys):

    - from Solaris 2.6 to Solaris 2.6 consistently works
    - from Solaris 2.6 to Solaris 8 consistently works
    - from Solaris 8 to Solaris 2.6 consistently fails (exit code == 255)

On Solaris 8 I'm using the same binaries as on 2.6, built natively on
2.6. Perhaps therein lies the problem (I hope not).

> Work around is to use rsa1 keys and SSH1.5 protocol.
> 
> Verified using OpenSSH 2.3.0p1, 2.9p1, 2.9.9p2 on Solaris 8.  We'll be
> glad to supply more detailed debugging output or whatever on request.



> 	Matthew
> 
> -- 
> Matthew Seaman                                              01628 498661
> 
>                 Abeo, abeo, abeo, actum est, comites!


Nico
--

Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.




More information about the openssh-unix-dev mailing list