Hi,
I'm new user of SSH.NET, I have some questions on it.
var cmd = ssh .CreateCommand("./executescript");
cmd.BeginExecute();
var reader = new StreamReader(cmd.OutputStream);
var result = reader.ReadToEnd();
but I can't finish executing the script because it will ask a question like 'would you like to do that? yes or no', how can I send yes or no during executing the scripts?
I'm new user of SSH.NET, I have some questions on it.
-
How can I su my account by runcommand or runshell? I know it's an old question, but I didn't find a worked solution for me on the internet. Could you help?
-
I'd like to execute a script on linux server, I have a sample code as below.
var cmd = ssh .CreateCommand("./executescript");
cmd.BeginExecute();
var reader = new StreamReader(cmd.OutputStream);
var result = reader.ReadToEnd();
but I can't finish executing the script because it will ask a question like 'would you like to do that? yes or no', how can I send yes or no during executing the scripts?