Bug 3323

Summary: Add an addition message for explaining the exit status.
Product: Portable OpenSSH Reporter: Vicky <yewenqi>
Component: sshdAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED WONTFIX    
Severity: enhancement CC: djm
Priority: P4    
Version: 7.6p1   
Hardware: 68k   
OS: OpenBSD   

Description Vicky 2021-06-21 16:58:19 AEST
Usually we will open the debug mode to trace the connection and locate the problem. When the server side is disconnect, client side will get a message "debug1: Exit status -1". Some non-experienced users will be misled by this message and think that the issue resides on the client side.
Whether we can add an addition message for explaining the exit status is from which side? Such as "debug1: Exit status 1 from remote server hostname.xyz".
Comment 1 Damien Miller 2021-08-27 13:33:03 AEST
I think the existing debug message is accurate because it literally shows what the client will exit with. The next line after that debug message is exit(exit_status) :)

Moreover, this value will not always be derived from the server - there a number of cases where it's possible for the value to come from the client alone: ssh -N and a server that doesn't send the channel exit-status message (which is optional in the protocol) are two that come to mind.
Comment 2 Damien Miller 2022-02-25 13:57:55 AEDT
closing bugs resolved before openssh-8.9