Differences between SFTP and "FTP over SSH"

sundar venugopal picture sundar venugopal · Jan 13, 2009 · Viewed 78.2k times · Source

While looking for an SFTP client in C# SSH File Transfer Protocol (SFTP), I've come across these two suitable projects - one and two.

While trying to understand the basics, I came across this confusing Wikipedia article. What is difference between SFTP and FTP over SSH? No library seems to give support for "FTP over SSH", if it is different.

Answer

Kristopher Johnson picture Kristopher Johnson · Jan 13, 2009

Here is the difference:

  • SFTP (SSH file transfer protocol) is a protocol that provides file transfer and manipulation capabilities. It can work over any reliable data stream, but is typically used with SSH
  • "FTP over SSH" uses the regular old FTP protocol, but an SSH tunnel is placed between client and server.

You probably won't find libraries for "FTP over SSH" because typically the tunnel is set up by running an SSH command, and once it is set up, clients and servers don't need to know about the tunnel; they just open ports and transfer data they way they would without a tunnel.

BTW, yet another option for you might be FTP over SSL (FTPS), which is supported by .NET. (See http://msdn.microsoft.com/en-us/library/system.net.ftpwebrequest.enablessl.aspx.)