39

I'm a bit surprised I haven't found a good open source library for performing common network tasks. There are a few very good commercial libraries, but they're too expensive to use on an open source project.

Anyone know of any?

Kilhoffer
  • 32,375
  • 22
  • 97
  • 124

9 Answers9

30

SSH.NET Library - https://github.com/sshnet/SSH.NET

Inspired by Sharp.SSH, this library is complete rewrite using .NET 4.0, without any third party dependencies and utilizes parallelism as much as possible to allow best performance.

It's been a solid C# implementation of client side SSH.

Rowland Shaw
  • 37,700
  • 14
  • 97
  • 166
Michael
  • 319
  • 3
  • 2
  • 3
    Much better implementation than SharpSsh and actively being developed. Highly recommended. – Beyers Aug 09 '11 at 21:42
4

edtFTPNet is free, but you have to buy their "Pro" version to get SFTP (FTP over SSH) and FTPS (FTP over SSL).

jeffm
  • 3,120
  • 1
  • 34
  • 57
4

Although it hasn't been updated in a while, it is free! I remember being able to get SharpSSH to run without much hassle, and it supports port forwarding (which is what I was looking for at the time!).

SharpSSH http://www.tamirgal.com/home/dev.aspx?Item=SharpSsh

Ray Li
  • 2,311
  • 3
  • 17
  • 13
4

.Net ships with some basic FTP support via System.Net.FtpWebRequest, but its a bit crude at best. A far superior alternative that I can recommend is dotNET FTP client from sourceforge.

I don't know if you're looking for email libraries too, but its something that I came across, so I'll mention it.

For email composing and delivery, the basic .NET libraries are fine. System.Net.Mail.MailMessage is great for composing emails, and System.Net.Mail.SmtpClient is good for sending emails over SMTP.

For retrieving emails with POP3 and parsing MIME messages, you will want an external library. I've been using POP3 MIME Client from codeproject without any problems.

I hope that helps!

Gabriel
  • 305
  • 1
  • 6
  • 15
3

It's not a single library, and I'm not sure how good they are but I was able to find a couple of links to open source libraries here:

http://csharp-source.net/open-source/network-clients

Hope this helps! Jeff

Jeff
  • 388
  • 3
  • 10
2

Lumisoft is open source and has FTP, DNS, IMAP, POP3 clients, among other stuff. It doesn't include SSH and SFTP though.

Mauricio Scheffer
  • 98,863
  • 23
  • 192
  • 275
1

In practice, the only place where I currently do SFTP, I use putty's bundled psftp utility, and run it from a process object. That may not be great, but it's working reliably for me.

AJ.
  • 13,461
  • 19
  • 51
  • 63
0

IIRC, FTP is built in to .NET, (System.Net.FtpWebRequest) and last time I looked (a couple of years ago, admittedly) I couldn't find any free SSH / SFTP assemblies. That might have changed, though.

ZombieSheep
  • 29,603
  • 12
  • 67
  • 114
  • 2
    FtpWebRequest has some limits/issues for non-standard ftp servers - like those used by certain large nameless banks for ACH uploads. If the ftp server provides a single unexpeced response, it just throws and exception and dies and you can't get around it. – Steven A. Lowe Sep 30 '08 at 15:00
  • The FtpWebRequest class is only for the request, though. It doesnt do anything to facilitate file transfer or connection management. I would not consider it a fully functional library for FTP. – Kilhoffer Sep 30 '08 at 17:47
0

I did some research and found an implementation of SSH in C#, called sharpSsh. It is a port of the Jsch (Java Secure Channel) library for Java. We use Jcsh here at my employer, and it's great. I can't vouch for the C# version.

Robert S.
  • 25,266
  • 14
  • 84
  • 116
  • 1
    SharpSSH sucks, and doesn't work. Trust me, I've tried it. I'm serious, it fails on the simplest of scenarios with no error or explanation. That thing needs to be wiped off the internet like a brown underwear stain. – Zoran Pavlovic Aug 26 '12 at 14:30