OK, but that is only a substitute for "ls". I gather that might have been a simple example for any command.
– Henk HoltermanJan 3 '11 at 9:56

1

@Hangy: Thanks for replying. I could not able to run your suggested code as I have to get system with all .Net setup. .....I am looking for a solution which will handy to run any command or script which is in Remote System.(Thanks Henk Holterman) .
– vrbilgiJan 3 '11 at 10:04

Sorry, I have not used that myself, but I hope the example in my edit and the added links help you to achieve that!
– hangyJan 3 '11 at 10:34

@user430294 do you mean that you can't use third-party components? Then you are out of luck -- .NET doesn't have built-in SSH support. You would have to write an SSH client from scratch or use third-party library. The ones mentioned by hangy above are free and unsupported. We offer our supported components: eldos.com/sbb/net-ssh.php .
– Eugene Mayevski 'Allied BitsJan 3 '11 at 12:25

2

you forgot a line in ssh.net 2nd example. You must do a sshclient.Connect() after the using :)
– JoshuaMay 1 '14 at 12:00