Every time you download a software update, upload a file to a college server, or a network administrator configures a router sitting in another city, a communication protocol is quietly doing the heavy lifting. Two of the oldest and most foundational of these are FTP and Telnet. Both operate at the application layer of the TCP/IP model, meaning they sit closest to the end user and the applications we actually interact with. FTP handles moving files between machines, while Telnet lets you log in to a distant computer and control it as if you were sitting right in front of it. Understanding how they work, why one of them has been largely retired, and where they still fit in tells you a lot about how the internet was built and how it has matured.
Table of Contents
- File Transfer Protocol (FTP)
- How FTP works
- Active and passive modes
- Common FTP commands
- Anonymous FTP access
- Remote login with Telnet
- How Telnet works
- Security concerns and the shift to SSH
- Why SSH replaced Telnet
- Securing file transfers too
- Use cases and best practices
- When to use FTP
- When to use Telnet
- General best practices
File Transfer Protocol (FTP)
FTP is an application-layer protocol used to transfer files between a client and a server over a TCP/IP network. It provides a standardized method for exchanging files across different systems, and it has been a workhorse of web development, data backups, and software distribution for decades. Because it relies on the Transmission Control Protocol (TCP), FTP ensures that data packets arrive correctly and in the right order, which makes it reliable for transferring everything from text documents to large binary program files.
How FTP works
FTP follows a client-server model. The FTP client is a program running on your computer that lets you connect, browse directories, and transfer files. The FTP server is the system that hosts the files and waits for requests. The interesting part is that FTP does not use a single connection. Instead, it opens two separate channels to keep commands and data from interfering with each other.
The first is the command channel (also called the control channel), which operates over port 21. This channel carries instructions such as logging in, listing directory contents, and changing directories, along with the server’s responses. The second is the data channel, which carries the actual file content and directory listings. This channel is opened and closed for each transfer, giving file data a dedicated pathway separate from the control traffic. This dual-channel design is one of the things that makes FTP efficient, but as we will see later, it also creates headaches with firewalls.
Active and passive modes
FTP supports two modes for establishing the data connection. In active mode, the client opens the command channel, and the server initiates the data connection back to the client. The trouble is that if the client sits behind a firewall, this incoming connection often gets blocked. Passive mode solves this. Here, the client requests the server to open a port and share its address, and the client then connects to the server for both channels. Passive mode is the default in most setups precisely because it works better when the client is protected by a firewall.
Common FTP commands
When you use FTP through a command-line client, you interact with it using a set of short, UNIX-like commands. A few that you will encounter constantly include:
- get – retrieves a single file from the server.
- mget – retrieves multiple files at once.
- put – uploads a file to the server.
- ls – lists the files available in the current server directory.
- cd – changes the working directory on the server.
- quit – closes the session and returns you to the command prompt.
FTP also transfers files in different modes depending on the content. ASCII mode handles plain text files and performs character conversion when needed, while binary (image) mode transfers data without any modification and is the default for non-text files. Most modern operating systems ship with a built-in FTP utility, so you rarely need to memorise these commands unless you are scripting automated transfers.
Anonymous FTP access
Not every file on an FTP server requires private credentials. Many servers offer anonymous FTP, a method that lets the public access files without a registered account. To log in, the username is simply set to anonymous, and the password is conventionally the user’s email address. Access under anonymous FTP is deliberately limited. Users can usually download publicly available files, but they cannot browse private directories or make modifications. This was historically how universities and software projects distributed documents, drivers, and open datasets to anyone who wanted them.
Remote login with Telnet
While FTP moves files, Telnet moves your presence. The name stands for Terminal Network, and it is the standard TCP/IP protocol for a virtual terminal. In plain terms, Telnet lets you connect to a remote system so that your local terminal behaves as though it were directly attached to that distant machine. You type commands locally, they execute on the remote computer, and the output comes back to your screen.
How Telnet works
Telnet is one of the oldest network protocols, with roots going back to 1969 and formally defined in RFC 854. It follows a client-server design: a Telnet server application runs on the remote system you want to manage, and a Telnet client runs on your local machine. The connection is established over TCP port 23. Once connected and authenticated, you get an interactive command-line session on the remote host, able to run programs, edit files, and perform administrative tasks.
For years this was the standard way to log in to a remote computer to run programs on it. You would open a terminal window, type telnet followed by a domain name or IP address, enter your credentials, and you were in. It was simple, lightweight, and worked across UNIX systems and a wide range of network devices like routers and switches.
Security concerns and the shift to SSH
Here is where the story takes a sharp turn. Both FTP and Telnet were designed in an era when networks were small, trusted, and not assumed to be hostile. Neither protocol encrypts its traffic. With Telnet, everything travels in plain text – including usernames and passwords. Anyone able to listen in on the network can intercept that traffic and read the credentials directly. This makes Telnet acutely vulnerable to eavesdropping and man-in-the-middle attacks, where an attacker quietly hijacks or alters the communication.
Why SSH replaced Telnet
As the internet expanded through the 1990s and untrusted networks became the norm, these weaknesses became unacceptable. The answer arrived in 1995 when Tatu Ylönen developed Secure Shell (SSH) as a drop-in replacement for Telnet and similar protocols. SSH operates over TCP port 22 and wraps the entire session in a secure, encrypted channel, making eavesdropping and tampering far harder.
SSH works through a combination of symmetric and asymmetric cryptography. When a client connects, the server presents its public host key, which the client verifies to confirm it is talking to the correct server. A key exchange process – often using Diffie-Hellman – then establishes a shared session key used to encrypt the rest of the traffic. SSH also supports public key authentication, where the client holds a private key and the server holds the matching public key, enabling secure and even password-less logins for trusted workflows.
The practical result is that SSH has become the dominant protocol for accessing network devices and servers over the internet, while Telnet is now considered outdated. In most professional environments, migrating away from Telnet is treated as a basic security upgrade: install an SSH server such as OpenSSH, open port 22 on the firewall, block port 23, and disable the Telnet service entirely.
Securing file transfers too
FTP faces the same fundamental problem. Because plain FTP sends credentials and file contents in clear text, it is best treated as a legacy option suitable only for non-sensitive files on tightly controlled, private networks. Two secure successors emerged to address this. FTPS is essentially FTP with SSL/TLS encryption layered on top; it keeps FTP’s familiar two-connection design but adds the complexity of managing certificates. SFTP, by contrast, is not FTP with security bolted on – it is a separate protocol built on SSH that typically uses a single encrypted connection over port 22.
Because SFTP relies on one port and treats encryption as the default state, it tends to be easier to run securely and is far friendlier to firewalls. For most modern and compliance-sensitive needs, SFTP is the sensible default, with FTPS reserved for situations where a vendor requires it or where an organisation already maintains disciplined certificate management.
Use cases and best practices
So where do these protocols actually fit today? The honest answer is that the unencrypted originals have shrunk to narrow, specific roles, while their secure descendants handle the real work.
When to use FTP
Plain FTP still makes sense for moving non-sensitive files within trusted, internal networks, or for distributing publicly available files through anonymous FTP where there is nothing confidential to protect. For anything involving personal data, login credentials, or regulated information, FTP should be avoided in favour of SFTP or FTPS. The general rule is straightforward: if the data has any value to protect, do not send it in clear text.
When to use Telnet
Telnet’s legitimate uses today are mostly limited to isolated, trusted environments and specific testing or troubleshooting tasks. A common example is using Telnet to check whether a particular port on a server is open and responding. For genuine remote administration of servers, routers, and switches, SSH is the standard, and Telnet should be disabled on production devices. It may occasionally linger on legacy hardware that simply does not support SSH, but that is a constraint to work around, not a recommendation.
General best practices
A few principles tie this together. Always prefer encrypted protocols – SSH for remote access and SFTP or FTPS for file transfers. When using SSH, stick to version 2, since version 1 has known weaknesses, and disable outdated ciphers. Manage your keys and permissions carefully, since strong cryptography is only as good as the discipline behind it. And in organisations bound by regulations such as data protection laws, choosing a protocol with encryption built in from the start saves the cost and risk of trying to secure an insecure one after the fact.
FTP and Telnet remain worth studying not because you should deploy them widely, but because they reveal the design decisions and security lessons that shaped everything that followed. Their successors, SFTP and SSH, exist precisely because the originals trusted the network a little too much.
What do you think? If you were setting up file access for a small college computer lab on a private internal network, would you accept plain FTP for the convenience, or insist on SFTP from day one? And given how long Telnet survived despite its flaws, what does that tell you about how slowly security improvements actually get adopted in the real world?
References
- https://www.geeksforgeeks.org/computer-networks/file-transfer-protocol-ftp-in-application-layer/
- https://kinsta.com/knowledgebase/what-is-ftp/
- https://www.fortinet.com/resources/cyberglossary/file-transfer-protocol-ftp-meaning
- https://www.geeksforgeeks.org/computer-science-fundamentals/file-transfer-protocol-ftp/
- https://upskilld.com/learn/telnet-vs-ssh/
- https://lightyear.ai/tips/telnet-versus-ssh
- https://serverspace.io/support/help/telnet-vs-ssh-pros-and-cons/
- https://medium.com/@vishvadiniravihari/ssh-securing-remote-access-in-the-post-telnet-era-887a9cb0adec
- https://www.geeksforgeeks.org/computer-networks/difference-ssh-telnet/
- https://www.goanywhere.com/blog/ftp-vs-sftp-considerations-secure-file-transfer
- https://sftptogo.com/blog/what-is-the-difference-between-ftp-sftp-and-ftps/
- https://teamupdraft.com/documentation/updraftplus/topics/cloud-storage/ftp-fstp/faqs/ftp-vs-sftp-vs-ftps/

Leave a Reply