Error when sending data with channel.sdata() #459
Replies: 1 comment
|
Hard to say what's going on because |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello, I'm looking to get some help with setting up an interactive shell and sending data to it using
channel.sdata(). Currently, I'm hitting the following error when I callchannel.sdata()(we are on v0.49.2):ERRO error handling client msg: unexpected program data from client. For the server, I'm following the example inechoserver.rsand have implemented the followingHandlermethods that I need for the server:I'm using these methods in the following way:
However, running this with
SshTestMode::Shellresults in the error I pasted aboveERRO error handling client msg: unexpected program data from client. I've narrowed it down to somewhere client side before the message is sent or on the server when the request is first processed before the server'sdata()method is run (data()method in my custom config above is never hit). I thought it could be due to an incorrect argument type butsdata()expects&[u8], whichas_bytes()returns. For more context, usingexec()works. If I implementexec_request()the same way and use that instead, then the request reaches the server and hits this custom implementation correctly. Is there something that I'm doing wrong in my setup?All reactions