[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to set the disconnect message as a server


On 11/23/20 7:21 AM, Adley Phu wrote:
When disconnecting, the SSH protocol allows you to send a uint32 reason code and human readable description. See https://tools.ietf.org/html/rfc4253#section-11.1 <https://tools.ietf.org/html/rfc4253#section-11.1> "SSH_MSG_DISCONNECT"

You can receive this message with ssh_get_disconnect_message() but is it possible to set the message when disconnecting? Specifically, as a server disconnecting a client.

Hi,
at this moment, the ssh_disconnect() function does not take any argument to support different disconnect codes. We have all the RFC codes defined, but only the SSH_DISCONNECT_BY_APPLICATION is being used:

https://gitlab.com/libssh/libssh-mirror/-/blob/master/src/client.c#L693

If you would find this functionality useful, I would be happy to review your patches.

Regards,
--
Jakub Jelen
Senior Software Engineer
Crypto Team, Security Engineering
Red Hat, Inc.


References:
How to set the disconnect message as a serverAdley Phu <adley.phu@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org