For a computer network to exchange data and resources, a set of different devices such as routers, switches, and computers are required. This network would then have to follow a protocol, probably several protocols, in order to establish proper communication between all of these devices. FTP and SFTP are two such protocols.
What are SFTP and FTP? FTP provides a way to exchange files over a network, while SFTP provides secure access, transfer and management of files in a data stream. FTP is data sent in plain text, while SFTP encrypts all data sent.
The main difference between FTP and SFTP is security. FTP does not provide a secure channel for transferring files between multiple devices, unlike SFTP. Hence, SFTP is more secure than FTP. However, in this article, we’ll take a closer look at the differences between the two protocols.
HDG explains: What is SFTP and FTP?
To understand the difference between SFTP and FTP, you first need to better understand what they are and what they do. Their uses differ only slightly, but the differences are much deeper than meets the eye.
What is FTP?
FTP or File Transfer Protocol is a standard network protocol that allows you to transfer files over a network between a client (local computer) and a server.
Before operating systems with a graphical user interface (GUI) appeared, FTP was designed to send and receive files between old text-based computers and networks. It was one of the first programs used to access information on the Internet long before the advent of the Hypertext Transfer Protocol (HTTP).
– /
There are three main uses for FTP today: graphical FTP clients, web browser, and command line FTP. Each is suitable for a variety of applications including desktops, servers, mobile devices, and hardware platforms.
Graphical FTP clients
These clients allow you to transfer files in a drag and drop format. Filezilla is probably the best known free FTP client for Windows operating systems. Cyberduck exists for Mac.
Typically, when opening a program, you enter your FTP host, your username and password. On some servers, it may be configured so that you can log in anonymously, in which case a username and password may not be required.
Then you can drag files and folders from the host to the server (and vice versa) and wait for the transfer to complete.
Web Browser
Using a web browser to connect to an FTP server will probably be more familiar since you can connect to an FTP address in the same way as you would an HTTP address. The web browser also makes it easy to browse large directories, read files, and extract them. It will also provide you with a service to automatically handle some of the details of connecting to the site and transferring files.
While FTP may seem convenient in a web browser, it is often slower and less reliable than a dedicated FTP client. They also tend to have fewer features.
FTP from the command line
You may not know this, but your operating system most likely has built-in command line clients. If you have a Windows, Mac or Linux operating system. Open a command prompt for your operating system (Command Prompt for Windows, Terminal for Mac, or Console for Linux) to get started.
Then, for example, type
ftp ftp.empire.gov
Now hit Enter. Then if you log into your account, use the username and password for that account. When accessing anonymously, use anonymous as your username and your email address as your password.
At this point, you need to navigate to the directory where the files that you want to move are stored. You can enter the mput command followed by the file or folder name and press Enter to start the transfer.
There are many commands you can learn if you like that can help you with future FTP transfers. Indiana University has some useful FTP commands to check out if you’re interested.
What is SFTP?
SFTP, which stands for SSH File Transfer Protocol, is a network protocol similar to FTP in that it allows files to be accessed, transferred, and managed, but over a secure and reliable data stream.
Unlike FTP, it does not use separate command and data pipes. Instead, it transfers files in specially formatted packets in a single connection. SSH in the name stands for Secure SHell protocol, for which SFTP is an extension. This provides an additional layer of security when using SFTP.
You can use SFTP in the same way as FTP, the biggest difference is the secure connection. Filezilla and Cyberduck also offer SFTP as part of their free package, which you will definitely want to take advantage of.
When connecting to an SFTP server, it is assumed 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 a great example of a site that supports both FTP and SFTP connections. When trying to add a theme that you have saved to your computer or 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 might need during normal upload. This is true for other files, not just themes.
The main difference between SFTP and FTP
The most noticeable and obvious difference is the definition. SFTP is a secure network protocol, while FTP is not. Still the types of the protocol. FTP is a TCP / IP based protocol. SFTP is an SSH based protocol.
TCP / IP stands for Transmission Control Protocol / Internet Protocol. In other words, it is a standard protocol that governs the exchange of data between all computers on the Internet.
- FTP establishes its control connection on TCP port 21, while SFTP transfers files over the connection established by SSH. between client and server.
- FTP only sends data in plain text, while SFTP encrypts all of its data before sending it to the host.
- SFTP is also an independent protocol that allows transfers from one host to another, while FTP is a more open protocol.
Some time ago, to add a bit of security to FTP, Netscape created SSL or Secure Sockets Layer (currently TLS or Transport Layer Security). SSL was then applied to FTP to create FTPS.
This made it possible to securely exchange data using FTP over two security options: implicit FTPS SSL and explicit FTPS. Both use SSL encryption.
Ultimately, the only key difference to worry about is that SFTP provides a secure way to transfer files from one host to another. FTP provides standard transmission of plain text over only two channels, command and data channel, without encryption.
–