0

I have some set of Putty commands that i always Run to do a same task on a remote Linux machine.

Now i want to do same through c# windows application?

Please suggest, I explored many ways but did not succeed. Please sugest.

For example i enter following commands to enter into directory.

cd ABC\DEF

Thanks, Saman

Saman
  • 33
  • 1
  • 7
  • Use an SSH library for C#, such as those suggested in http://stackoverflow.com/questions/4881587/c-sharp-library-for-ssh-and-telnet. – akton Sep 22 '12 at 11:32

1 Answers1

0

Use an SSH library for C#, such as those suggested in C# Library for SSH and Telnet or https://stackoverflow.com/questions/622278/ssh-library-for-creating-ssh-connections-in-c-sharp. Use SSH to connect to the machine, authenticate, enter the desired commands then view any output and check for errors/

Community
  • 1
  • 1
akton
  • 14,148
  • 3
  • 43
  • 47
  • Sorry i did not find any SSH libraray and morever which commands i need to use? – Saman Sep 22 '12 at 12:07
  • I have not used it myself but I have heard good things about http://granados.sourceforge.net/ (linked in both the questions above). SSH gives you a telnet-like prompt on the destination server, so you use and command line commands you would normally use. – akton Sep 22 '12 at 12:09
  • Also http://sourceforge.net/projects/sharpssh/?source=recommended and http://sourceforge.net/projects/dotnetssh/?source=recommended are worth looking at. Granados is apparently discontinued. – akton Sep 22 '12 at 12:11