1

I'm looking for a way to create a c# program where I can script multiple session logins etc. I have to check about 200 servers for differences in a particular file, and I'd like to automate that with c#. I've looked around here, and haven't found anything recent and up-to-date on what I would like to do. Currently I'm checking the files manually using PuTTY. I came across http://sshnet.codeplex.com/ as it was suggest elsewhere on stackoverflow, but I've run into a few issues. Mainly after executing a command, you're returned to the inital state. For example, running "cd /etc/sysconfig" and then "ls" won't output the contents of "/etc/sysconfig/", but instead the contents of the default folder.

Is there a free library that I could use to accomplish this? I'm looking for PuTTY-like functionality that I can implement into a C# program. Thanks a lot.

lukiffer
  • 11,025
  • 8
  • 46
  • 70
  • possible duplicate of [C# Library for SSH and Telnet](http://stackoverflow.com/questions/4881587/c-sharp-library-for-ssh-and-telnet) – ChristopheD May 02 '12 at 20:14

3 Answers3

0

sharpSsh (untested, but looks fine) ?

ChristopheD
  • 112,638
  • 29
  • 165
  • 179
  • I had heard that was extremely outdated in the other stackoverflow threads. I may try it out though, if nothing else is available. Thanks. – user1370933 May 02 '12 at 20:12
  • Have you seen this thread: http://stackoverflow.com/questions/4881587/c-sharp-library-for-ssh-and-telnet – ChristopheD May 02 '12 at 20:14
  • Yes, I have. Granados doesn't seem to be maintained anymore. Poderosa isn't what I'm really looking for, and it doesn't seem to have very much documentation (not that I can find, at least). It also doesn't seem to be maintained, either. – user1370933 May 02 '12 at 20:36
0

You need not SSH but SFTP client component. SFTP is SSH File Transfer Protocol and such client component will let you connect to remote servers, request directory listings and read file contents (among other necessary functions). Our company offers sophisticated components for SSH and SFTP in our SecureBlackbox product, and FREE license for SFTP client component is available with no strings attached as described on http://www.sftp-net.com/free-sftp-net.html .

Eugene Mayevski 'Callback
  • 45,135
  • 8
  • 71
  • 121
0

Putty offers also a command line interface - thus you could also consider using this from C#.
Alternatively you could also use scp or sftp - what are you checking with the files? Are the files big?

weismat
  • 7,195
  • 3
  • 43
  • 58