Telnet is a legacy application-layer protocol that provides command-line access to remote systems. It operates over TCP port 23 and allows users to remotely log into a system to execute commands, manage files, or perform administrative tasks.
Protocol Layer: Application Layer (OSI Layer 7)
Port: TCP/23
Transport: TCP
Encryption: None (plaintext)
How Telnet Works
The basic operation of Telnet involves establishing a virtual terminal session between a Telnet client and a Telnet server.
Telnet Session Flow
- Connection Establishment
- The client initiates a TCP connection to port 23 on the server.
- No encryption is used during the handshake or communication.
- User Authentication
- Upon connection, the server prompts for a username and password.
- These credentials are sent in cleartext over the network.
- Remote Access
- If authentication succeeds, the user is granted access to a shell on the remote system.
- From there, commands can be issued as if the user were locally present.
Security Limitations
While Telnet is functional, its lack of encryption poses major risks:
- Plaintext Transmission
- All data, including login credentials and commands, is transmitted unencrypted.
- Eavesdropping Risk
- Any attacker with packet sniffing tools (like Wireshark) can intercept Telnet traffic and read it.
- Session Hijacking
- Due to no encryption or session validation, attackers can inject or replay commands.

Example: Telnet in Action
A user initiates a Telnet session to a remote system:
$ telnet 192.168.1.10
Trying 192.168.1.10...
Connected to 192.168.1.10.
Escape character is '^]'.
login: Omar
password: ********
Welcome to Bento Linux!
Omar@bento:~$