Patch to fix the 255 status code problem

Daniel Kahn Gillmor dkg-openssh.com at fifthhorseman.net
Thu Feb 1 03:39:40 EST 2007


At 2007-01-31 15:53, tim.mann at bt.com said:

> Currently using openssh-4.5p1 on Solaris 8 in conjunction with
> Oracle 8i dataguard. Is there a patch available to prevent ssh
> returning status code 255 for a successful execution of a remote
> connection/command.

I believe it should already do what you need.  the man page [0] says:

  ssh exits with the exit status of the remote command or with 255 if
  an error occurred.

Can you provide more details about the problem you're having?  The
behavior it sounds like you want is already present on my setup here
(openssh 4.2p1 and 3.8.1p1 on linux 2.6).  My prompt shows the return
value of the previous command:

[0 dkg at baboon ~]$ ssh gorilla true
[0 dkg at baboon ~]$ ssh gorilla false
[1 dkg at baboon ~]$ 

hth,

	--dkg

[0] http://www.openbsd.org/cgi-bin/man.cgi?query=ssh


More information about the openssh-unix-dev mailing list