views:

4301

answers:

8

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?

A: 

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
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
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
+3  A: 

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

jeffm
+2  A: 

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
+5  A: 

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

R4Y
It claims to support publickey authentication but I could never get that part to work. The other basic SSH features worked fine though.
Mark Biek
Public key authentication works fine for me, but there are many (MANY) bugs in other areas...
Thomas Levesque
Someone has been working on this at CodePlex ( http://sharpssh2.codeplex.com/ ) I haven't really used it though. Still trying to find a better solution.
Luke
We have found bugs (mainly unfinished parts) too
jacko
SharpSSH is not perfect, but it is the best free SFTP library for .NET.
rmx
+3  A: 

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
+2  A: 

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

Mauricio Scheffer
A: 

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.
+3  A: 
Gabriel