2

I want to write a program that accesses my routers and perform some command, while its output is save to file on my disk. I have done this successfully using python pexpect module in linux. I am starting C# .net and want to try over it. Searching google gave me some result on ssh client, but i dont know if any of them can get me the result back ?

Any ideas, i know i shouldnt be asking for any code snippet, just point me in right direction specially if someone has used it to fetch configurations off ssh servers.

Christian Rau
  • 45,360
  • 10
  • 108
  • 185
user1068846
  • 163
  • 2
  • 3
  • 9

1 Answers1

8

You may try the SSH.NET library.

Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928
  • +1 for that. I've been looking for something similar myself! :) – Polynomial Nov 28 '11 at 07:09
  • its perfect library for SSH its already using by a lot of big companies – Mustafa Ekici Nov 28 '11 at 07:17
  • Sir, i have visited the site. I know i am asking a very dumb question but how shall i use this in my code ? i downloaded the .dll but how to use it ? i know this is a very stupid question but pls guide me. do i need to download the .dll or something else from that site ? – user1068846 Nov 28 '11 at 10:27
  • 1
    @user1068846, yes, you should reference the assembly in your project. If you don't know how to do this I would strongly recommend you reading some .NET tutorial first. – Darin Dimitrov Nov 28 '11 at 12:07
  • If you are VS 2010 or VS 2012, you can get it via Nuget. Open Tools > Library Package Manager > Package Manager Console and type `Install-Package SSH.NET`. – Animesh Apr 25 '13 at 09:07