For a computer network to exchange data and resources, it takes a collection of different devices, such as routers, switches, and computers. That network would then have to follow a protocol, probably multiple protocols, to establish proper communication between all those devices. FTP and SFTP are two such protocols.
What is SFTP and FTP? FTP provides a way to exchange files over the network, while SFTP allows secure access, transfer, and management of files over the data stream. FTP is that data is sent as plain text while SFTP encrypts all data in order to be sent.
The main difference between FTP and SFTP is security. FTP does not provide a secure channel to transfer files between multiple devices while SFTP does. Therefore, SFTP is more secure than FTP. However, this article takes a closer look at the differences between these two protocols.
HDG Explains: What is SFTP and FTP?
To understand the differences between SFTP and FTP, you first need to better understand what they both are and do. Usage varies only slightly between them, but the differences run a little deeper than they appear at first glance.
What is FTP?
FTP, or file trelease protocol, is a standard network protocol that allows files to be transferred over a network between a client (local computer) and a server.
Prior to operating systems with graphical user interfaces (GUIs), FTP was developed to send and receive files between older text-based computers and networks. It was one of the original programs used long before that to access information on the Internet huhYestext trelease protocol (HTTP) came around.
Today, there are three primary ways to use FTP: Graphical FTP clients, Web browser, and Command-line FTP. Each is suitable for different applications, including desktops, servers, mobile devices, and hardware platforms.
Graphical FTP Clients
These clients allow files to be transferred in a drag and drop format. Filezilla is probably the most famous free FTP client for Windows operating systems. For Mac, there’s Cyberduck.
Normally, when you open a program, you enter the FTP host, your username, and a password. Some servers have it set up so that you can enter anonymously, in which case the username and password may not be needed.
You can then drag and drop files and folders from host to server (and vice versa) and wait for the transfer to complete.
Using a web browser to connect to an FTP server will probably be more familiar, as you can connect to the FTP address in the same way as you would to an HTTP address. A web browser also makes it easy to browse a larger folder, read and retrieve files. It will also provide you the service to handle some site connection details and file transfers automatically.
While FTP web browser may seem useful, it is often slower and less reliable than a dedicated FTP client. They also tend to have fewer features.
Command Line FTP
You may not know it, but your operating system probably has built-in command-line clients. As long as your operating system is Windows, Mac or Linux anyway. Open your operating system prompt (Command Prompt for Windows, Terminal for Mac, or Console for Linux) to get started.
Then type as example
Now press Enter† Then when you open your own account, use the username and password for that account. Use with anonymous access anonymously as your username and your email address as your password.
At this point, you want to be in the folder where the files you want to move are stored. You can enter the mput command followed by the name of the file or folder and press Enter to activate the transfer.
There are plenty of commands you can learn, if you like, that can help you with future FTP transfers. University of Indiana has a few handy FTP commands to check out if you’re interested.
What is SFTP?
SFTP, which stands for sSH file trelease protocol, is a network protocol similar to FTP in that it allows file access, transfer and file management, but through a secure and reliable data stream.
Unlike FTP, it does not use separate command and data channels. Instead, it transfers files in specially formatted packages in a single connection. The SSH in the name stands for secure SHell protocol, for which SFTP is an extension. This provides an extra level of security when using the SFTP protocol.
You can use SFTP in the same way as FTP, with the main difference being the secure connection. Filezilla and Cyberduck also offer SFTP as part of their free package, which is definitely something you’ll want to take advantage of.
Connecting to an SFTP server assumes that the connection is over a secure channel. This eliminates the need for client authentication as the client’s user identity is made available to the protocol.
WordPress is an excellent example of a site that allows for both FTP and SFTP connections. When trying to add a theme that you have stored on your computer or a server, you may need to transfer that theme via FTP or SFTP.
This is to prevent WordPress from rejecting certain lines of code that your theme needs during a normal transfer. This applies to other files, not just themes.
Key Difference Between SFTP and FTP
The most noticeable and obvious difference is in the definition. SFTP is a secure network protocol while FTP is not. Another example is the protocol types. FTP is a TCP/IP based protocol. SFTP is an SSH-based protocol.
TCP/IP stands for: transom Ccheck protocol/linternet protocol. In other words, it is the standard protocol that governs communication between all computers on the Internet.
- FTP establishes its control connection on TCP port 21, while SFTP sends files under the connection established by the SSH protocol between client and server.
- FTP only sends data in plain text, while SFTP encrypts all data before sending it to the host.
- SFTP is also an independent protocol that provides host-to-host transfers while FTP is a more open protocol.
A while ago, to add a bit of security to FTP, Netscape released the SSL, or secure ssockets layer (currently TLS, or ttransport layer ssecurity). SSL was then applied to FTP to create FTPS.
This allowed data to be exchanged securely via FTP via two secure variants: FTPS Implicit SSL and FTPS Explicit SSL. Both use SSL encryption.
Ultimately, the only major difference that most should worry about is that SFTP provides a secure way to transfer files from one host to another. FTP only provides standard plain text transmission over two channels, a command and a data channel, with no encryption.