Standard Input (stdin) #1340
scholes231
started this conversation in
General
Replies: 1 comment 2 replies
-
I have 2 suggestions:
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd like to send file via ssh. My command: addFile -s filename < C:.......txt. Is this supported?
I've tried this but not worked:
using (var shell = client.CreateShellStream("dumb", 0, 0, 0, 0, 4096))
{
var commandWithInput = $"{command}\n";
using (var inputMemoryStream = new MemoryStream(Encoding.UTF8.GetBytes(commandWithInput)))
{
inputMemoryStream.CopyTo(shell);
}
}
Where:
command variable: "addFile -s filename"
input variable is byte array
I have exception handling, but no error, result variable is empty. What did i wrong?
Beta Was this translation helpful? Give feedback.
All reactions