Thanks in advance for your help!
I am currently developing a program in C # 2010 that runs PLink (Putty) to create an SSH tunnel. I am trying to make the program able to track every tunnel that is open, so the user can terminate those instances that are no longer needed. I am currently using System.Diagnostics.Process.Start to run PLink (currently using Putty). I need to determine the PID of each plink program when it starts, so that the user can finish it as they wish.
The question is how to do this, and am I using the correct .Net namespace or is something better?
Code snippet:
private void btnSSHTest_Click(object sender, EventArgs e)
{
String puttyConString;
puttyConString = "-ssh -P " + cboSSHVersion.SelectedText + " -" + txtSSHPort.Text + " -pw " + txtSSHPassword.Text + " " + txtSSHUsername.Text + "@" + txtSSHHostname.Text;
Process.Start("C:\\Program Files (x86)\\Putty\\putty.exe", puttyConString);
}