Page MenuHomePhabricator

Connector interface does not work correctly in SSH server environment
Closed, ResolvedPublic


Hello there,

I've talked to ar1s about this before, I have a problem with the connector interface. After a character has been sent, nothing is transmitted anymore. I can reproduce the problem on Windows and Linux.
As an example I changed the "samplesshd-cb.c" from the examples folder.
When the user has authenticated, a connection to the local echo service will be established ( should also be enabled for this example ). Then the connector interface should be used to transfer all data from the channel to the socket and all data from the socket to the channel.
But this does not work correctly.


I can excluded a bug in the windows poll emulation, because I could reproduce the behavior under linux ( Debian 9.5 ).
Strangely enough, everything seems to work fine if you use the connector interface for the client side ( as in the example "libssh\examples\ssh_client.c" ).

If I want to use the connector interface for the server side, only the first data block is transferred, then nothing more.

Event Timeline

davidwed created this task.Dec 3 2018, 4:23 PM
davidwed updated the task description. (Show Details)
This comment was removed by davidwed.
aris claimed this task.Feb 5 2019, 1:27 PM
aris added a subscriber: aris.

Thanks for your contribution!
I'll review this patch asap.

asn added a project: Restricted Project.Feb 5 2019, 2:11 PM
asn added a subscriber: asn.

Thank you very much for your contribution.

Could you please add a more meaningful subject and add a description. The patch also lacks your sign-off. See SubmittingPatches in the source tree. Thanks!

This comment was removed by davidwed.
This comment was removed by davidwed.
davidwed added a comment.EditedFeb 14 2019, 4:15 PM

"ssh_packet_socket_controlflow_callback" is only called if you initialize a connection with ssh_connect. In server mode "ssh_packet_socket_controlflow_callback" is never called.