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"?
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.
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.
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).
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.
Check this out: http://www.tamirgal.com/home/dev.aspx?Item=sharpSsh
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