# Telnet
## What is Telnet
Telnet is a network protocol that provides a bidirectional, text-based communication channel between two computers. It was one of the earliest internet protocols, dating back to 1969, and was widely used for remote administration of computers and network devices. Telnet allows a user on one computer to log into another computer over a network and interact with it as if sitting at that computer's terminal. Commands typed by the user are transmitted to the remote computer, executed there, and the output is transmitted back and displayed on the user's screen.
## How Telnet Works
Telnet operates on port 23 using TCP for the transport connection. When a user starts a Telnet session, the Telnet client establishes a TCP connection to port 23 on the remote host. After the connection is established, the remote host typically presents a login prompt. The user enters their username and password, which are verified by the remote system. After successful authentication, the user has access to a command-line interface on the remote system. All characters typed by the user are sent over the network to the remote host, and all output from the remote host is sent back to the user's screen.
## Security Problems with Telnet
Telnet has a critical security vulnerability that has made it obsolete for most purposes. All data transmitted during a Telnet session, including the username and password used for authentication, is sent over the network in plaintext with no encryption. Anyone who can intercept the network traffic can see the username, password, and all commands and output of the session. In modern networks connected to the internet, this is an unacceptable security risk.
## Telnet Replaced by SSH
SSH, the Secure Shell Protocol, was developed as a secure replacement for Telnet. SSH provides the same remote terminal access functionality as Telnet but encrypts all communication, preventing eavesdropping. SSH also provides stronger authentication options. Telnet should not be used for any sensitive communication over untrusted networks. In contemporary networking, Telnet is used only in isolated, fully trusted network environments where security is not a concern, or for testing and troubleshooting where the operator intentionally wants to examine plaintext protocol traffic.Back to Subject