SFTP Libraries for .NET

C#.NetSftp

C# Problem Overview


Can anyone recommend a good SFTP library to use? Right now I'm looking at products such as SecureBlackbox, IPWorks SSH, WodSFTP, and Rebex SFTP. However, I have never used any SFTP library before so I'm not sure what I'm looking for.

If anyone has used these before, is there any reason why I should go with product "X" over "Y"?

C# Solutions


Solution 1 - C#

I've searched around and found that this fork of SharpSSH and SSH.NET are the most up to date and best maintained libraries for SFTP (not to be confused with FTPS) communication in .NET. SSH.NET is a clean .NET 4.0 implementation of the SFTP protocol, and I've used it in a couple of solutions with flying colors and great success.

The original SharpSsh seems to be dead and most other solutions either require installation of Windows executables or a bucketload of cash (or worse; both).

Solution 2 - C#

We use WinSCP. Its free. Its not a lib, but has a well documented and full featured command line interface that you can use with Process.Start.

Update: with v.5.0, WinSCP has a .NET wrapper library to the scripting layer of WinSCP.

Solution 3 - C#

Check this out: http://www.tamirgal.com/home/dev.aspx?Item=sharpSsh

> SharpSSH is a pure .NET implementation > of the SSH2 client protocol suite. It > provides an API for communication with > SSH servers and can be integrated into > any .NET application. > > The library is a C# port of the JSch > project from JCraft Inc. and is > released under BSD style license. > > SharpSSH allows you to read/write data > and transfer files over SSH channels > using an API similar to JSch's API. In > addition, it provides some additional > wrapper classes which offer even > simpler abstraction for SSH > communication. > > SharpSSH project page at source forge: > http://sourceforge.net/projects/sharpssh

Solution 4 - C#

We bought a Rebex File Transfer Pack, and all is fine. The API is easy, we haven't any problem with comunications, proxy servers etc...

But I havent chance to compare it with another SFTP/FTPS component.

Solution 5 - C#

Bitvise has a great product called Tunnelier which can bridge FTP to SFTP. You could then use the standard FtpWebRequest in .NET.

http://www.bitvise.com/ftp-bridge

I am currently testing this for my own purposes and will update with my findings.

update

This idea is not ideal for unattended automation, unless you want to jump through hoops keeping the client connected as a service or something, which I accomplished by using NSSM.

I've tried CLI automation with various clients including bitvise and winscp.com. I've also tried these .net class libraries: Winscp, SSH.NET, SharpSSH, and the commercial SecureBlackBox SFTP client.

SecureBlackBox worked well, but it's very heavy-weight, can be quite expensive depending on the licensing, and I didn't agree so much with it's API.

Hands down, the best free sftp client for .NET development is winscp. I've written a few classes and extension methods to make working with it easier: Winscp.Extensions

Solution 6 - C#

I've been using Chilkat's native SFTP library ( http://www.chilkatsoft.com/ssh-sftp-component.asp ) for a couple of months now and it's working great. Been using it in a nightly job to download large files and do private key authentication. Only problem that I had was getting the 64bit version to work on windows server 2008, I needed to install vcredist_x64.exe ( http://www.microsoft.com/download/en/details.aspx?id=14632 ) on my server.

Solution 7 - C#

For comprehensive SFTP support in .NET try http://www.enterprisedt.com/products/edtftpnetpro/overview.html">edtFTPnet/PRO</a>;. It's been around a long time with support for many different SFTP servers.

We also sell an SFTP server for Windows, http://www.enterprisedt.com/products/completeftp/overview.html">CompleteFTP</a>;, which is an inexpensive way to get support for SFTP on your Windows machine. Also has FTP and FTPS.

Solution 8 - C#

I've used IP*Works SSH and it is great. Easy to setup and use. Plus, their support is top-notch when you run into questions or problems.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJohn DoeView Question on Stackoverflow
Solution 1 - C#Asbjørn UlsbergView Answer on Stackoverflow
Solution 2 - C#JimView Answer on Stackoverflow
Solution 3 - C#GEOCHETView Answer on Stackoverflow
Solution 4 - C#TcKsView Answer on Stackoverflow
Solution 5 - C#Ronnie OverbyView Answer on Stackoverflow
Solution 6 - C#RocklanView Answer on Stackoverflow
Solution 7 - C#Bruce BlackshawView Answer on Stackoverflow
Solution 8 - C#BriggsView Answer on Stackoverflow