SecureBlackbox 16: FTPS (FTP over SSL) vs. SFTP (SSH File Transfe ... (2024)

File transfer over the network using the FTP protocol (defined by RFC 959 and later additions) has its roots in the year 1980, when the first RFC for the FTP protocol was published. FTP provides functions to upload, download, and delete files, create and delete directories, and read directory contents. While FTP is very popular, it has certain disadvantages that make it harder to use. The major drawbacks are the lack of a uniform format for directory listing (this problem has been partially solved by introducing the MLST command, but it’s not supported by some servers) and the presence of a secondary connection (the DATA connection). Security in FTP is provided by employing the SSL/TLS protocol for channel encryption as defined in RFC 2228. The secured version of FTP is called FTPS.

In UNIX systems another security standard has grown, the SSH family of protocols. The primary function of SSH was to secure remote shell access to UNIX systems. Later, SSH was extended with the file transfer protocol — first SCP (in SSH 1.x), then SFTP (in SSH2). Version 1 of the SSH protocol is outdated, insecure, and generally not recommended for use. Consequently, SCP is not used anymore and SFTP gains popularity day by day.

The SFTP abbreviation is often mistakenly used to specify some kind of Secure FTP, by which people most often mean FTPS. Another (similar) mistake is that SFTP is thought to be some kind of FTP over SSL. In fact SFTP is an abbreviation of “SSH File Transfer Protocol”. This is not FTP over SSL and not FTP over SSH (which is also technically possible, but very rare).

SFTP is a binary protocol, the latest version of which is standardized in RFC 4253. All commands (requests) are packed to binary messages and sent to the server, which replies with binary reply packets. In later versions, SFTP has been extended to provide not just file upload/download operations, but also some file-system operations, such as file lock, symbolic link creation, etc.

Both FTPS and SFTP use a combination of an asymmetric algorithm (RSA, DSA), symmetric algorithm (DES/3DES, AES, Twofish etc.) and key-exchange algorithm. For authentication FTPS (or, to be more precise, the SSL/TLS protocol under FTP) uses X.509 certificates, while SFTP (the SSH protocol) uses SSH keys.

X.509 certificates include the public key and certain information about the certificate owner. This information lets the other side verify the integrity of the certificate itself and the authenticity of the certificate owner. Verification can be done both by computer and to some extent by a human. An X.509 certificate has an associated private key, which is usually stored separately from the certificate for security reasons.

An SSH key contains only a public key (the associated private key is stored separately). It doesn't contain any information about the owner of the key. Neither does it contain information that lets one reliably validate integrity and authenticity. Some SSH software implementations use X.509 certificates for authentication, but in fact they don’t validate the whole certificate chain — only the public key is used (which makes such authentication incomplete and similar to SSH key authentication).

Here’s the brief list of pros and cons of the two protocols:

FTPS

Pros:

  • Widely known and used.
  • Human-readable communication.
  • Provides services for server-to-server file transfer.
  • SSL/TLS has good authentication mechanisms (X.509 certificate features).
  • FTP and SSL/TLS support is built into many internet communication frameworks.

Cons:

  • Doesn’t have a uniform directory listing format.
  • Requires a secondary DATA channel, which makes it hard to use behind the firewalls.
  • Doesn’t define a standard for file name character sets (encodings).
  • Not all FTP servers support SSL/TLS.
  • Doesn’t have a standard way to get and change file and directory attributes.

SFTP

Pros:

  • Has a standards background which strictly defines most (if not all) aspects of operations.
  • Has only one connection (no need for a DATA connection).
  • The connection is always secured.
  • The directory listing is uniform and machine-readable.
  • The protocol includes operations for permission and attribute manipulation, file locking, and more functionality.

Cons:

  • The communication is binary and can’t be logged “as is” for human reading.
  • SSH keys are harder to manage and validate.
  • The standards define certain parts as optional or recommended, which leads to certain compatibility problems between different software titles from different vendors.
  • No server-to-server copy and recursive directory removal operations.
  • No built-in SSH/SFTP support in VCL and the .NET Framework.

What to Choose

As usual, the answer depends on what your goals and requirements are. In general, SFTP is technologically superior to FTPS. Of course, it’s a good idea to implement support for both protocols, but they are different in concepts, in supported commands, and in many other things.

It’s a good idea to use FTPS when you have a server that needs to be accessed from personal devices (smartphones, tablets, etc.) or from some specific operating systems that have FTP support but don’t have SSH / SFTP clients. If you are building a custom security solution, SFTP is probably the better option.

As for the client side, the requirements are defined by the server(s) that you plan to connect to. When connecting to internet servers, SFTP is more popular because it’s supported by Linux and UNIX servers by default.

For private host-to-host transfer you can use both SFTP and FTPS. For FTPS you would need to search for a free FTPS client and server software or purchase a license for commercial one. For SFTP support you can install the OpenSSH package, which provides free client and server software. For commercial use we recommend the Bitvise SSH server.

Developer Tools

If you are a software developer and need to implement file transfer capability in your application, see below to find the components to do the job.

In .NET you have built-in support for FTPS in the .NET Framework (see the FtpWebRequest class). However, the functionality of this class is severely limited, especially in the aspect of control over SSL/TLS. The .NET Framework doesn't include support for SSH or SFTP.

In VCL you have a selection of free components and libraries that provide FTP functionality. When you add OpenSSL to them, you can get FTPS for free. If you don’t want to deal with OpenSSL DLLs, you can use one of the commercially available libraries for SSL and FTPS support. Again, there are no freeware SFTP components available for .NET.

For all mentioned platforms and technologies you are welcome to download the SFTP or FTPS components (both are part of the SecureBlackbox suite) and test them yourself.

We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at [email protected].

SecureBlackbox 16: FTPS (FTP over SSL) vs. SFTP (SSH File Transfe ... (2024)
Top Articles
Income statement - Definition, example & format of income statement - Zoho Books
3 Financial Statements to Measure a Company's Strength
Fernald Gun And Knife Show
Craigslist Monterrey Ca
litter - tłumaczenie słowa – słownik angielsko-polski Ling.pl
Simple Steamed Purple Sweet Potatoes
今月のSpotify Japanese Hip Hopベスト作品 -2024/08-|K.EG
Belly Dump Trailers For Sale On Craigslist
House Of Budz Michigan
Abortion Bans Have Delayed Emergency Medical Care. In Georgia, Experts Say This Mother’s Death Was Preventable.
Imagetrend Inc, 20855 Kensington Blvd, Lakeville, MN 55044, US - MapQuest
Moving Sales Craigslist
Exterior insulation details for a laminated timber gothic arch cabin - GreenBuildingAdvisor
Tinker Repo
I Saysopensesame
Food Universe Near Me Circular
Dallas Mavericks 110-120 Golden State Warriors: Thompson leads Warriors to Finals, summary score, stats, highlights | Game 5 Western Conference Finals
Bennington County Criminal Court Calendar
Johnnie Walker Double Black Costco
Abga Gestation Calculator
N.J. Hogenkamp Sons Funeral Home | Saint Henry, Ohio
Delta Rastrear Vuelo
Metro By T Mobile Sign In
Att U Verse Outage Map
Roch Hodech Nissan 2023
A Man Called Otto Showtimes Near Carolina Mall Cinema
Pickle Juiced 1234
Pitco Foods San Leandro
Timothy Kremchek Net Worth
Ippa 番号
Best Weapons For Psyker Darktide
Laff Tv Passport
Oriellys Tooele
Vocabulary Workshop Level B Unit 13 Choosing The Right Word
Janaki Kalaganaledu Serial Today Episode Written Update
Cnp Tx Venmo
Mudfin Village Wow
Shoecarnival Com Careers
Ghareeb Nawaz Texas Menu
BCLJ July 19 2019 HTML Shawn Day Andrea Day Butler Pa Divorce
Csgold Uva
Mauston O'reilly's
Craigslist Mendocino
20 Mr. Miyagi Inspirational Quotes For Wisdom
Unit 11 Homework 3 Area Of Composite Figures
What is a lifetime maximum benefit? | healthinsurance.org
The Sports Academy - 101 Glenwest Drive, Glen Carbon, Illinois 62034 - Guide
Take Me To The Closest Ups
Congruent Triangles Coloring Activity Dinosaur Answer Key
Page 5747 – Christianity Today
Muni Metro Schedule
Mail2World Sign Up
Latest Posts
Article information

Author: Nathanial Hackett

Last Updated:

Views: 6684

Rating: 4.1 / 5 (72 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Nathanial Hackett

Birthday: 1997-10-09

Address: Apt. 935 264 Abshire Canyon, South Nerissachester, NM 01800

Phone: +9752624861224

Job: Forward Technology Assistant

Hobby: Listening to music, Shopping, Vacation, Baton twirling, Flower arranging, Blacksmithing, Do it yourself

Introduction: My name is Nathanial Hackett, I am a lovely, curious, smiling, lively, thoughtful, courageous, lively person who loves writing and wants to share my knowledge and understanding with you.