exit status of ssh?
Stuart Henderson
stu at spacehopper.org
Mon Mar 21 08:06:59 EST 2011
On 2011-03-17, Chris Quenelle <chris.quenelle at oracle.com> wrote:
> The man page for ssh says that the exit status of ssh should
> be the exit status of the program that it runs.
>
> The session terminates when the command or shell on the remote machine
> exits and all X11 and TCP/IP connections have been closed. The exit sta???
> tus of the remote program is returned as the exit status of ssh.
> ...
> ssh exits with the exit status of the remote command or with 255 if an
> error occurred.
>
>
> But it doesn't seem to work.
What does 'type ssh' say? Some people alias it to a shell function
which resets the window title, and in some cases that function doesn't
correctly handle the exit code (/etc/ksh.kshrc in OpenBSD used to do
this, for example).
More information about the openssh-unix-dev
mailing list