Are there any good free .Net network libraries? (FTP, SFTP, SSH, etc.)

33,161

Solution 1

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.

Solution 2

.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!

Solution 3

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

Solution 4

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

Solution 5

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

Share:
33,161
Brendan Weinstein
Author by

Brendan Weinstein

I'm here to learn something!

Updated on July 04, 2020

Comments

  • Brendan Weinstein
    Brendan Weinstein almost 4 years

    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?

  • Mark Biek
    Mark Biek over 15 years
    It claims to support publickey authentication but I could never get that part to work. The other basic SSH features worked fine though.
  • Steven A. Lowe
    Steven A. Lowe over 15 years
    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.
  • Brendan Weinstein
    Brendan Weinstein over 15 years
    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.
  • Thomas Levesque
    Thomas Levesque almost 15 years
    Public key authentication works fine for me, but there are many (MANY) bugs in other areas...
  • Luke
    Luke almost 15 years
    Someone has been working on this at CodePlex ( sharpssh2.codeplex.com ) I haven't really used it though. Still trying to find a better solution.
  • Akshay Nalawade
    Akshay Nalawade over 14 years
    We have found bugs (mainly unfinished parts) too
  • Nobody
    Nobody over 13 years
    SharpSSH is not perfect, but it is the best free SFTP library for .NET.
  • Beyers
    Beyers almost 13 years
    Much better implementation than SharpSsh and actively being developed. Highly recommended.
  • Martin Vobr
    Martin Vobr almost 12 years
    Original poster wanted free and open source code.
  • Zoran Pavlovic
    Zoran Pavlovic over 11 years
    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.