SFTP Libraries for .NET [closed]

2018-12-31 21:00发布

问题:

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\"?

回答1:

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



回答2:

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.



回答3:

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



回答4:

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.



回答5:

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



回答6:

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.



回答7:

For comprehensive SFTP support in .NET try edtFTPnet/PRO. It\'s been around a long time with support for many different SFTP servers.

We also sell an SFTP server for Windows, CompleteFTP, which is an inexpensive way to get support for SFTP on your Windows machine. Also has FTP and FTPS.



回答8:

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.



标签: c# .net sftp