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
By default you can't write to the Standard Input of a running SshCommand and can only write to a process running in SSH by using CreateShellSession. This causes a few problems in my use-case (sending protobuf-formatted packets back and forth):
The input is mirrored back in the output, useful in an interactive context but not for automation
Sending arbitrary binary data can cause problems (like accidentally sending \u001b which is escape in UTF16 or similar)
A newline needs to be sent in order to actually commit input to the program
I've created a workaround for this that uses evil reflection hacks for sending stuff directly to SshCommand.
Proposed changes
Expose IChannelSession, IChannelSession and SshCommand._channel as public
or
Add a public method to SshCommand that calls _channel.SendData(byte[] data, int offset, int size)
I could create a PR for either solution, although I'm not sure yet how I would write a test for this.
The text was updated successfully, but these errors were encountered:
By default you can't write to the Standard Input of a running
SshCommand
and can only write to a process running in SSH by usingCreateShellSession
. This causes a few problems in my use-case (sending protobuf-formatted packets back and forth):\u001b
which is escape in UTF16 or similar)I've created a workaround for this that uses evil reflection hacks for sending stuff directly to
SshCommand
.Proposed changes
IChannelSession
,IChannelSession
andSshCommand._channel
as publicor
SshCommand
that calls_channel.SendData(byte[] data, int offset, int size)
I could create a PR for either solution, although I'm not sure yet how I would write a test for this.
The text was updated successfully, but these errors were encountered: