Why is .NET missing FTP/SFTP/SCP ?
-
I've always wondered that, and it's such a PITA trying to actually find a library that works. Marc
V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
-
I've always wondered that, and it's such a PITA trying to actually find a library that works. Marc
V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
-
I've always wondered that, and it's such a PITA trying to actually find a library that works. Marc
V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
-
Snazzy - I'll take a look. Thanks! Marc
V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
-
Brisingr Aerowing wrote:
Ah, I just came across the resurrected version of it (resurrected from sourceforge, onto CodePlex, and now moved to GitHub :laugh: ) Marc
V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
-
> SFTP is not supported as it is FTP over SSH, a completely different protocol (use SSH.NET for that) Oops. Marc
V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
-
Brisingr Aerowing wrote:
And we have a winner. :jig: Marc
V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
-
Brisingr Aerowing wrote:
And we have a winner. :jig: Marc
V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
:thumbsup:
What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???
-
I've always wondered that, and it's such a PITA trying to actually find a library that works. Marc
V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
-
I've always wondered that, and it's such a PITA trying to actually find a library that works. Marc
V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
WinSCP .NET Assembly is an option "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
-
WinSCP .NET Assembly is an option "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
I did get the WinSCP.NET assembly working (quite easily) but it requires that the exe be installed, whereas ssh.net worked just as easily without any dependencies. Also, when I tried WinSCP.NET, I had an older version of the exe, and got an incompatibility exception, so I don't want to create the added annoyance of having to make sure the exe and dll are sync'd. Marc
V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
-
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.
5 lines of code to do a file upload:
SftpClient sftp = new SftpClient("192.168.0.3", "[username]", "[password]");
sftp.Connect();
var st = new FileStream(@"c:\foo.txt", FileMode.Open);
sftp.UploadFile(st, "/home/debian/foo.txt");
sftp.Disconnect();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." :doh: Marc
V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
-
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.
jgakenhe wrote:
switched from FTP to FTPS
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.
-
jgakenhe wrote:
switched from FTP to FTPS
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.
-
Yes you're right, it is FTP over SSL. WinSCP has some documentation on FTPS at: FTPS :: WinSCP[^].
Ok, thanks. I did not see that information.