Differences between SFTP and "FTP over SSH"

C#FtpSshSftp

C# Problem Overview


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.

C# Solutions


Solution 1 - C#

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

Solution 2 - C#

Basically, there are the following file transfer protocols around:

  • FTP – the plain old FTP protocol that has been around since 1970s. The acronym stands for "File Transfer Protocol". It usually runs over TCP port 21.

  • SFTP – another, completely different file transfer protocol that has nothing to do with FTP. SFTP runs over an SSH session, usually on TCP port 22. It has been around since late 1990s. The acronym actually stands for "SSH File Transfer Protocol".

  • FTP over SSH - 1) possible, but extremely rare example of FTP protocol tunneled through a SSH channel 2) incorrectly named SFTP

(for details see "Secure FTP, FTP/SSL, SFTP, FTPS, FTP, SCP... What's the difference?" page at Rebex)

Disclaimer: I work for Rebex

Solution 3 - C#

SFTP is actually another protocol that runs over SSH - an extension of SSH if you like. People tend to use SFTP rather than tunnelling FTP over SSH.

For comprehensive SFTP support in .NET try http://www.enterprisedt.com/products/edtftpnetpro/overview.html">edtFTPnet/PRO</a>;. It's been around a long time with support for many different SFTP servers.

Solution 4 - C#

Here's a simple explanation:

  • FTPS = FTP + SSL
  • SFTP = SSH using an FTP program

https://www.webstix.com/knowledgebase/general/how-to-connect-using-sftp/

Solution 5 - C#

SFTP is it's own protocol. FTP over SSH is using FTP once you're connected via SSH.

Solution 6 - C#

  • SFTP stands for SSH File Transfer Protocol. It's not FTP over SSL and not FTP over SSH. SFTP is standardized in RFC 4253.
  • FTP stands for File Transfer Protocol which is defined by RFC 959 and latter additions. FTP is very popular but not secured. Therefore FTP over SSL was introduced and it's called FTPS or FTP/SSL.

For authentication SFTP use SSH keys, while FTPS use X.509 certificates.

Solution 7 - C#

FTP over SSH is plain FTP protocol tunneled through SSH. SFTP is the file transfer mechanism offered by SSH and it's a completely different protocol. I haven't seen anybody using FTP over SSH.

Solution 8 - C#

SFTP (SSH File Transfer Protocol) may be a secure file transfer protocol that runs over the SSH protocol. It secures the perform and authentication of the SSH.

This further layer of protection guarantees that the affiliation is genuine with certificates in order that the shopper and also the server will form a stable and reliable connection. This offers an inexpensive degree of security as long because the acceptable certificates are in order.

it's continually counseled that you just have a certificate on your web site to tell guests of its validity and ensure a connection, however if this can be not practical, for example, if you're uploading files to a brand new web site that you just are presently operating on, SFTP may well be the simplest alternative If you hook up with a server that uses SFTP when you’ve been a devoted FTP user for many years, you will be slightly stunned at the speed drop compared to what you’re used to.

this can be as a result of there's plenty of additional packet ANd cryptography going down throughout an SFTP transfer that's not gift whereas mistreatment FTP. There are some things price sacrificing for speed, however safety is maybe not one of them.

I use this source for my answer : Difference_Between_FTP_and_SFTP

Solution 9 - C#

I just created a .NET SFTP Library. One of the things I learned in the process is how different FTP is to SFTP. You are actually communicating with an SSH server instead of an FTP server. It's not just the protocol, the commands are totally different that you are sending to the SSH server.

Here is a link to my library.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionsundar venugopalView Question on Stackoverflow
Solution 1 - C#Kristopher JohnsonView Answer on Stackoverflow
Solution 2 - C#Martin VobrView Answer on Stackoverflow
Solution 3 - C#Bruce BlackshawView Answer on Stackoverflow
Solution 4 - C#Tony HermanView Answer on Stackoverflow
Solution 5 - C#jacobangelView Answer on Stackoverflow
Solution 6 - C#user3766626View Answer on Stackoverflow
Solution 7 - C#mmxView Answer on Stackoverflow
Solution 8 - C#aliza iztonView Answer on Stackoverflow
Solution 9 - C#Greg FinzerView Answer on Stackoverflow