Closed
Description
I'm trying to run a program that requires an input to select which module within the program to run. I can connect fine, and I can run the program, but I seem to be having zero luck writing to the shellstream I am creating. I've gone through every issue ticket regarding this, and most of the solutions make it seem super simple, but nothing is working for me.
using (var client = new SshClient("10.0.0.136", "ubuntu", "ubuntu"))
{
client.Connect();
var runCommand = client.CreateCommand("cd Documents/OnboardSDK/build/bin; ./sample-program");
var result = runCommand.BeginExecute();
var reader = new StreamReader(runCommand.OutputStream);
Console.WriteLine(reader.ReadToEnd());
var stream = client.CreateShellStream("term", 80, 24, 800, 600, 1024);
stream.WriteLine("a");
client.Disconnect();
}
I get the output of the program up until where the stdin should be, but writing to the stream isn't causing the program to continue. "a" is the option I am picking, and in a putty session all I need to do is type a and hit the enter key for the program to continue.
Any insight is greatly appreciated, I am new to this library. Thanks.
Metadata
Metadata
Assignees
Labels
No labels