RFC Errata
RFC 4254, "The Secure Shell (SSH) Connection Protocol", January 2006
Note: This RFC has been updated by RFC 8308
Source of RFC: secsh (sec)
Errata ID: 3877
Status: Held for Document Update
Type: Editorial
Publication Format(s) : TEXT
Reported By: Jim Wigginton
Date Reported: 2014-02-02
Held for Document Update by: Kathleen Moriarty
Date Held: 2014-07-01
Section 6.10 says:
6.10. Returning Exit Status When the command running at the other end terminates, the following message can be sent to return the exit status of the command. Returning the status is RECOMMENDED. No acknowledgement is sent for this message. The channel needs to be closed with SSH_MSG_CHANNEL_CLOSE after this message. The client MAY ignore these messages.
It should say:
6.10. Returning Exit Status When the command running at the other end terminates, the following message can be sent to return the exit status of the command. Returning the status is RECOMMENDED. No acknowledgement is sent for this message. The channel needs to be closed by the server with SSH_MSG_CHANNEL_CLOSE after this message. The client MAY ignore these messages.
Notes:
Even though it can arguably be inferred from the text as written I think it'd make it more clear if the RFC explicitly said that the server is the one that should be sending the SSH_MSG_CHANNEL_CLOSE message.