The Lounge is rated PG. If you're about to post something you wouldn't want your
kid sister to read then don't post it. No flame wars, no abusive conduct, no programming
questions and please don't post ads.
I don't know. I played around with WinSCP for a couple of days in December because we switched from FTP to FTPS and had to rewrite some legacy code. After reading this forum, I'll take a look at SSH.net next time.
SftpClient sftp = new SftpClient("192.168.0.3", "[username]", "[password]");
var st = new FileStream(@"c:\foo.txt", FileMode.Open);
The only nuance was that the target (second parameter) must also include the filename. The WinSCP.NET dll implementation doesn't require this. With SSH.NET, finding that was a bit annoying, as the exception message was "Failure!" That was helpful. Had to read through a couple forums with people having the same error to find someone that posted "you need the filename on the destination path."
Just to make sure everyone reading this thread understands there is a difference between SFTP and FTPS. WinSCP does not do FTPS as far as I can tell; it does SFTP. SFTP basically wraps copying files with SCP (which in turn uses SSH), and FTPS is FTP over SSL. These follow very different protocols to achieve the same result.
"The WinSCP .NET assembly winscpnet.dll is a .NET wrapper around WinSCP’s scripting interface that allows your code to connect to a remote machine and manipulate remote files over SFTP, FTP, WebDAV and SCP sessions from .NET languages, such as C#, VB.NET, and others, or from environments supporting .NET, such as PowerShell, SQL Server Integration Services (SSIS), ASP.NET and Microsoft Azure WebSite." winscp.net
Last Visit: 31-Dec-99 19:00 Last Update: 19-Feb-17 7:44