This is what I'm doing:
ssh_ = new Process();
ssh_.StartInfo.FileName = SshProvider;
ssh_.StartInfo.Arguments = "-t -t " + Environment.UserName + "@" + serverName_;
ssh_.StartInfo.UseShellExecute = false;
ssh_.StartInfo.RedirectStandardInput = true;
ssh_.StartInfo.RedirectStandardOutput = true;
ssh_.StartInfo.RedirectStandardError = true;
ssh_.StartInfo.CreateNoWindow = true;
ssh_.Start();
new Thread(new ThreadStart(ReadStdOut)).Start();
new Thread(new ThreadStart(ReadStdErr)).Start();
I want to read the password prompt from stdout (or stderr) and write the password into stdin, but ssh is writing and reading from the console from which I started my mono app. I don't understand why that is, since I have redirected those streams in the code above.