What is FTP? In-depth article on FTP, FTPS and SFTP
FTP stands for File Transfer Protocol. As the name says, it is a protocol that allows anyone to transfer files between two machines connected with each other via the Internet. It was invented by Abhay Bhushan in 1971. At first, FTP ran on Network Control Program, also known as NCP. After the invention of TCP/IP, the protocol started using TCP/IP.
The Internet, as we know it, works on hundreds of such protocols. For example, the article you are reading right now is delivered to you on the HTTP/HTTPS protocol.
Similarly, when you send and receive an Email from your Email client, IMAP and POP protocols are in use. Just like that, to transfer files between two systems, you have to use the FTP protocol. In this article, we will first see the usage of FTP protocol, then we will learn a major disadvantage of FTP protocol and then we will learn different versions of FTP that are widely in use today.
First of all, let us see what is the use of FTP and similar protocols.
What is the practical use of FTP/FTPS/SFTP?
Do not worry if you don’t know the full form of FTPS and SFTP, we are going to cover those topics in detail later in this article. We will learn the practical use of this protocol with the help of some examples.
Assume you are a web developer and you just finished a project. Now, it is time for the world to see your creation. So, how to take your project live on the Internet? You have to upload it to the server. Let’s assume you already have a server. It means that you have to transfer your project files from your computer to the server. And you can do it using an FTP client. An FTP client will use the FTP protocol to connect to the server.
Another practical use of this protocol is file sharing. For example, Adobe shares it’s software on FTP for the customers who do not have the CDs of the software. Similarly, you can enable File sharing in your Windows, Mac or Linux computer.
Now, let us learn more about how it works.
How FTP works?
FTP is a standard network protocol. It is used to transfer files between a client and a server in a computer network. The protocol works upon a client-server architecture.
The majority of the time, you have to use the correct username and password combination to connect to the server via FTP. In some cases, you can also connect to the server via FTP anonymously, without providing the username and password.
The protocol works on two channels, namely Command channel, and Data channel. The command channel is responsible for carrying information about the tasks. And the data channel is responsible for transfers happening between a client-server connection on the protocol.
Now, let us learn more about two other variants of the protocol.
What is FTPS?
The FTPS is the extension to the FTP which is common. It is also known as FTP over SSL. FTPS adds support for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) cryptographic protocols. The FTPS uses server-side public key authentication certificates and client-side authorization certificates. It supports compatible ciphers such as AES, RC4, RC2, Triple DES, and DES. It also supports hash functions such as SHA, MD5, MD4, and MD2.
The FTPS runs on different ports. The default ports for FTPS are 21 and 990. Again, there are two variants of FTPS. Let us discuss both of them in detail.
FTPS Implicit SSL
The port 990 is for the implicit FTPS. When a client connects to the server at this port, it is assumed that the client needs to perform SSL. Therefore, the SSL handshake takes place immediately. In the FTPS Implicit SSL, SSL is mandatory. Without SSL, no further communication will occur. Such connection attempts are refused by the server.
FTPS Explicit SSL
The FTPS explicit SSL works on the port 21. The FTP clients connecting on the port 21 need to perform an extra step specifying their intention to use SSL by sending an AUTH SSL or AUTH TLS command to the server. Once the command is received by the server, the SSL Handshake is performed and a Secured Socket Layer connection is established. Unlike FTPS Implicit SSL, the clients can establish the connection without SSL in port 21. This will help the client use a secure connection when necessary.
What is SFTP?
The SFTP is often confused with the FTPS, but these two protocols are entirely different and don’t share anything in common except they securely transfer data between the connected systems. The SFTP protocol is relatively a new one. It had been developed in the 1990s. As we have seen earlier, this protocol also transfers data securely.
With this protocol, the data is transmitted over a connection that has been previously secured with SSH protocol. The FTPS and SFTP are two different protocols. The SFTP is packet-based while the FTPS is text-based. The FTP(S) sends commands to the server to perform operations and SFTP sends information in binary format.
The SFTP is based on the SSH (Secure Shell) protocol and not related to FTP. Unlike FTPS, SFTP does not utilize special connections for data and command channels but is achieved by transferring both command and data by specially formatted packets.
What are the best FTP clients?
FTP clients allow you to connect to your server via FTP/SFTP/FTPS protocols to transfer files between your computer and server. There are tens of FTP clients available for free in the market. Here are some of the most popular FTP clients along with the supported operating systems.
- Filezilla: Filezilla is available in Windows, Linux as well as Mac OS X. You can download it directly from the official website or from the software repository of your operating system.
- WinSCP: WinSCP is easy to use FTP client for Windows users. You can download it from the official WinSCP website if you are using Windows.
- CyberDuck: CyberDuck is very popular as a modern and easy FTP client. If you are using Mac OS, there are chances that you will select Cyberduck as a preferred client.
From these three FTP clients, I recommend you to go with FileZilla if you don’t already have a preferred client. It is because FileZilla is widely used by professionals and you can easily find tutorials about FTP on the internet if you are stuck somewhere.
Conclusion: FTP was an awesome invention that we are still using in 2019 to transfer files between computers connected with each other via the Internet. With the growing market of file sharing and cloud storage applications, the usage of FTP is now limited to the professionals who regularly work on the servers. Also, the applications use the FTP protocol to transfer files between two machines under the hood, in the background. Let us know if you have any questions regarding FTP, please let us know in the comment section, we will get back to you with answers as soon as possible.