ssh2 icon indicating copy to clipboard operation
ssh2 copied to clipboard

Sending disconnect message feature is missing

Open dmkng opened this issue 6 years ago • 3 comments

Hello, I'm writing an SSH Server which works similar to OpenSSH Server. I wanted to send disconnect event to client when it writes wrong password too many times. I find out that I can send custom disconnect event with client._sshstream.disconnect(<reason>), but I've not found any built in function that I can send disconnect message with it. Is that feature missing or I've just not found it?

dmkng avatar Dec 26 '18 02:12 dmkng

It's currently not exposed since it's not typically useful. For example, even OpenSSH always sends the same disconnect reason code, including when the configured maximum authentication retries has been reached.

mscdex avatar Dec 26 '18 03:12 mscdex

Hello, I want to find out how to send disconnect message (like "Too many authentication failures"), not reason code, as I found a method for sending reason code.

dmkng avatar Dec 26 '18 08:12 dmkng

That's not supported currently.

mscdex avatar Dec 26 '18 13:12 mscdex