[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to set the disconnect message as a server
[Thread Prev] | [Thread Next]
- Subject: Re: How to set the disconnect message as a server
- From: Jakub Jelen <jjelen@xxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Mon, 23 Nov 2020 18:28:30 +0100
- To: libssh@xxxxxxxxxx
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#L693If 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.
How to set the disconnect message as a server | Adley Phu <adley.phu@xxxxxxxxx> |