Computer Networks Essentials / Application Layer

Telnet

πŸ€” What is Telnet? (Basic Idea)

Sometimes, we want to:

  • Access another computer remotely 🌍

  • Run commands on a remote machine πŸ’»

  • Manage servers from far away

πŸ‘‰ Telnet was designed for this purpose.


🧠 Simple Definition

πŸ“Œ Telnet is an application-layer protocol that allows a user to remotely log in to another computer over a network and execute commands.


🧠 What Does Telnet Do?

Using Telnet, a user can:

  • Log in to a remote system

  • Execute commands as if physically present

  • Manage files and processes remotely

πŸ“Œ Telnet provides a command-line interface, not a graphical one.


🧠 Real-Life Analogy

πŸ“ž Phone Call to Control a Computer

  • You give instructions verbally

  • Other person executes them

πŸ‘‰ Telnet works similarly:

  • You type commands

  • Remote system executes them


🧭 Where Does Telnet Belong in OSI Model?

  • Telnet is an Application Layer protocol

  • Uses TCP for communication


πŸ”Œ Port Number Used by Telnet

Protocol

Port

Telnet

23

πŸ“Œ Telnet always uses TCP port 23.


πŸ”„ How Telnet Works (Step-by-Step)

1️⃣ User runs Telnet client

2️⃣ Client connects to remote server (port 23)

3️⃣ Server asks for username & password

4️⃣ User enters credentials

5️⃣ Login successful

6️⃣ User executes commands remotely

πŸ“Œ Everything happens via text commands.


⌨️ Telnet Communication Style

  • Character-by-character transmission

  • Text-based (ASCII) communication

  • No encryption ❌

πŸ“Œ This is Telnet’s biggest weakness.


⚠️ Major Security Problem with Telnet

🚨 Telnet is NOT secure

Why?

  • ❌ Username sent in plain text

  • ❌ Password sent in plain text

  • ❌ Commands visible to attackers

πŸ“Œ Anyone using packet sniffing can:

  • Steal passwords

  • Hijack sessions


πŸ”“ Why Telnet Is Considered Insecure?

  • No encryption

  • No authentication protection

  • Vulnerable to attacks

πŸ‘‰ This is why Telnet is deprecated.


🧠 Uses of Telnet (Today)

Although insecure, Telnet is still used:

  • πŸ“š For learning & teaching networks

  • πŸ§ͺ Testing open ports

  • πŸ” Checking server response

  • 🧠 Understanding client-server model

πŸ“Œ Not recommended for production systems.


πŸ” Telnet vs SSH (Quick Preview)

Feature

Telnet

SSH

Security

❌ No

βœ… Yes

Encryption

❌ No

βœ… Yes

Port

23

22

Usage

Old / Testing

Modern / Secure

πŸ“Œ SSH has replaced Telnet.


🧠 Advantages of Telnet

  • Simple to use

  • Low overhead

  • Easy remote access

❌ Disadvantages of Telnet

  • No encryption

  • Poor security

  • Easily attackable

  • Not safe for Internet use


🧠 Memory Tricks

  • TELNET = TEXT LOGIN

  • 23 = Telnet port

  • No lock πŸ”“ = Not secure


⭐ One-Line Summary

πŸ”Ή Telnet is an application-layer protocol that allows remote login using plain-text communication, making it insecure for modern use.