You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Is it a better practice to actively close the socket when the forwarded-tcpip channel receives an EOF? #1754
My server program uses this library to perform remote port forwarding with an SSH forwarding server. The client connects to the server through the SSH forwarding server. I need to close the session between the client and the server when the client actively closes the socket. Currently, the library only closes after a timeout. When I modify ChannelForwardedTcpip to add EndOfData handling, I can achieve the desired effect, as shown in the diagram. Could this modification cause any problems? For example: frequent creation and destruction of channels affecting performance? Resources not being properly released? Data not being fully transmitted before closing?
EndOfData (SSH_MSG_CHANNEL_EOF) is sent by the server when it will not send any more data on the channel, but I don't think it would preclude that data could still be sent in the other direction (from the connected host back across the channel).
I don't know a whole lot though. Probably whatever OpenSSH does is the right answer
Activity
canzu commentedon Jan 19, 2026
Is this a bug?
Rob-Hague commentedon Feb 4, 2026
EndOfData (SSH_MSG_CHANNEL_EOF) is sent by the server when it will not send any more data on the channel, but I don't think it would preclude that data could still be sent in the other direction (from the connected host back across the channel).
I don't know a whole lot though. Probably whatever OpenSSH does is the right answer