Telnet, short for "teletype network," is a protocol that enables you to establish a command-line connection to a remote computer over a network, typically the Internet. It was one of the earliest methods for remotely accessing and managing computers before the widespread use of graphical user interfaces (GUIs) and more secure protocols like SSH (Secure Shell).
How does Telnet work:
Client-Server Interaction: Telnet operates in a client-server architecture. The client is the software running on your computer that initiates a connection to a remote server. The server is the computer you're connecting to.
1. Connection Establishment: When you initiate a Telnet connection, your Telnet client establishes a connection to the Telnet server using the Telnet protocol, typically over port 23. This connection can be made over a local network or the internet.
2. Text-Based Interaction: Once the connection is established, the server's command-line interface becomes accessible through your client. You can input text-based commands on your local machine, and these commands are sent to the server.
3. Command Exchange: The server processes the commands it receives and sends back the results to your client. The server-side commands are executed on the server's operating system as if they were entered directly on the server's keyboard.
4. Text-Based Output: The output generated by the server's commands is transmitted back to your client and displayed on your local machine. This can include text-based information, responses, error messages, and more.
5. Data Encoding: Telnet communicates using plain text, which means that everything you type and receive is transmitted as readable text. This includes passwords and sensitive information, making Telnet connections inherently insecure, as the data can be intercepted and read if not properly encrypted.
6. Lack of Encryption: One significant drawback of Telnet is its lack of encryption. This means that all the data, including passwords and other sensitive information, is transmitted in clear text, making it vulnerable to eavesdropping and data interception. For this reason, Telnet is considered insecure for connecting to remote servers over public networks like the internet.
7. Security Concerns: Due to the security issues inherent in Telnet, it is generally recommended to use more secure protocols like SSH (Secure Shell) for remote access. SSH provides encrypted communication and better authentication methods, ensuring that your data remains confidential and secure during transmission.
In summary, Telnet is a protocol that facilitates remote command-line access to computers. While it played a significant role in the early days of networking, its lack of encryption and security vulnerabilities have led to its declining use in favour of more secure alternatives like SSH.
Configuration Example:
Switch to line configuration mode to the Telnet device, using the following commands. Notice that the prompt changes to reflect the current mode.
Router(config)#line vty 0 4
Router(config-line)#
Configure password checking at login.
Router(config-line)#login local
From the privileged EXEC ( "enable") prompt, enter configuration mode and enter username/password combinations, for each user for whom you want to allow access to the router:
Router# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#username mike password ciscotelnet@123
Router# telnet 10.1.1.1 (Reachable IP of the Telnet device)
Trying 10.1.1.1 ... Open
User Access Verification
Username: mike
Password:
Password entered here is not displayed by the router
Issue the show users command in order to verify the line used by the remote users.
R1#show users