I am working on a Windows app with C# as a programming langugage.
Requirement is
I don't know if this helps, because I can't try it right know, but it could lead you to the right direction. Try something like this:
string hostname = "hostname";
string login = "login";
string password = "password";
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.UseShellExecute = false;
startInfo.RedirectStandardInput = true;
startInfo.FileName = @"C:\Putty\plink.exe";
startInfo.Arguments = string.Format("{0}@{1} -pw {2}", login, hostname, password);
Process p = new Process();
p.StartInfo = startInfo;
p.Start();
p.StandardInput.WriteLine("cd /dir1/dir2/NewFolder");
You should try 'plink', which is the command line version of Putty. With startInfo.RedirectStandardInput you specify, that the you can write to the stdin of the process with p.StandardInput.WriteLine(). This is also available for stdout, so you can read the output of the process.