mirror of
https://github.com/sshnet/SSH.NET.git
synced 2026-09-10 09:15:47 +00:00
70a0a08dae
* Handle unknown channel messages correctly See discussion #1218 . Some servers send custom channel messages like 'keepalive@proftpd.org' as keep alive messages. This currently causes a NotSupportedException. According to the spec https://datatracker.ietf.org/doc/html/rfc4254#section-5.4 : "If the request is not recognized or is not supported for the channel, SSH_MSG_CHANNEL_FAILURE is returned." Send a failure message back instead of throwing an exception. * consider WantReply before sending failure reply * Use RemoteChannelNumber for failure message * fix wrong ChannelNumber in SshCommand Channel Response not directly related to the PR, was noticed during Code Review. --------- Co-authored-by: Rob Hague <rob.hague00@gmail.com>