1

Resolved

Incorrect response to unknown channel request

description

from Matthew Dippel:
 
I noticed when first experimenting with your server implementation that I was getting disconnected after any reasonable amount of data was sent. NSsh didn't know what to do with a Channel Request of type "winadj@putty.projects.tartarus.org", so it throws an exception (Invalid Channel Request: ...) and disconnects the session.
 
It appears this channel request type was added to PuTTY after 0.60 and is unique to PuTTY. I reviewed the documentation here: http://tartarus.org/~simon/putty-snapshots/htmldoc/AppendixF.html#sshnames, and it indicates that the server should respond with SSH_MSG_CHANNEL_FAILURE so I adjusted the code accordingly. My fix was to simply add the channel type to ChannelRequestType.cs and respond with ChannelFailurePacket in RequestReceived(ChannelRequestType packet) in Channel.cs. I am not an SSH expert so this may be horribly wrong, however, but based on the logs I received from PuTTY, the server appears to be handling that request according to spec with my fix. I'm also not getting disconnected due to that request type.

comments