Telnet - TELecommunication NETwork
What is Telnet?
Telnet (short for TELecommunication NETwork) is a network protocol used to provide a bidirectional interactive text-based communication facility using a virtual terminal connection. It allows users to remotely access and manage devices over a TCP/IP network, typically on port 23.
Why is Telnet useful?
Remote Access – Enables users to log into remote systems and control them as if they were local.
Device Management – Commonly used for configuring network devices like routers and switches.
Simple Protocol – Lightweight and easy to implement for basic remote control.
Cross-Platform – Available on most operating systems and networked devices.
Testing and Debugging – Useful for testing open ports and services on remote systems.
How it works?
Connection Initiation – The client initiates a TCP connection to the server on port 23.
Negotiation – Client and server negotiate options like terminal type and echo settings.
Authentication – The user is prompted to enter a username and password (in plaintext).
Command Execution – The user can execute commands on the remote system via a virtual terminal.
Session Maintenance – The session remains active until the user logs out or the connection is closed.
Session Termination – Either side can terminate the session, closing the TCP connection.
Where is Telnet used?
Legacy Systems – Still used in older systems that don’t support SSH.
Network Device Configuration – Used to configure routers, switches, and firewalls.
Remote Server Access – For managing servers without graphical interfaces.
Testing TCP Connectivity – Useful for checking if a port is open on a remote host.
Educational Environments – Used in labs to demonstrate basic networking concepts.
Which OSI layer does this protocol belong to?
User Interaction – Provides a user interface for remote communication.
Runs Over TCP – Operates on top of the transport layer (TCP).
Application-Level Protocol – Handles terminal emulation and command execution at the application layer.
Topics in this section,
In this section, you are going to learn
Terminology
Version Info
Telnet |
RFC |
Year |
Core Idea / Contribution |
---|---|---|---|
Version |
|||
Initial Version |
|||
RFC 854 |
1983 |
Defined the base Telnet protocol, including the concept of a Network Virtual Terminal (NVT), option negotiation using IAC commands, and symmetric terminal-process communication. |
|
Clarifications |
|||
RFC 1123 |
1989 |
Provided implementation requirements and clarifications for Telnet and other protocols as part of host requirements. |
|
Option Extensions |
|||
RFC 4777 |
2006 |
Defined Telnet encryption option using AES, extending Telnet for secure communication. |
|
Character Encoding |
|||
RFC 5198 |
2008 |
Specified Unicode (UTF-8) text transmission over Telnet, improving internationalization support. |
Setup
Setup
TCP Connection Establishment Packet
S.No |
Protocol Packets |
Description |
Size(bytes) |
---|---|---|---|
1 |
TCP Connection Establishment |
Telnet runs over TCP, typically on |
Standard TCP |
port 23 |
header |
||
(2060 bytes) |
|||
Source Port |
Port of the client |
2 |
|
Destination Port |
Usually 23 (Telnet server) |
2 |
|
Sequence Number |
TCP sequence tracking |
4 |
|
Acknowledgment No. |
Acknowledges received data |
4 |
|
Flags |
SYN, ACK, etc. for connection control |
1 |
|
Window Size |
Flow control |
2 |
|
Checksum |
Error checking |
2 |
|
Options (optional) |
TCP options |
Variable |
|
Telnet Data Packet
2 |
Telnet Data Packet |
Transmits user input or output |
Variable |
---|---|---|---|
data |
|||
Data Byte |
ASCII character or control byte (e.g., user input/output) |
1 |
|
IAC (0xFF) |
If present, indicates start of a Telnet command (must be escaped if literal) |
1 |
|
Command Byte |
If IAC is present, this byte specifies the command (e.g., DO, WILL, SB, etc.) |
1 |
|
Option Byte |
If applicable, specifies the Telnet option being negotiated |
1 |
|
Subnegotiation |
Begins with IAC SB, includes option code and data, ends with IAC SE |
Variable |
|
Telnet Command Packet (IAC Sequence) Packet
3 |
Telnet Command Packet (IAC Sequence) |
Used to negotiate options or send |
23+ |
---|---|---|---|
control commands |
|||
IAC |
Interpret As Command (always 0xFF) |
1 |
|
Command |
DO (0xFD), DON’T (0xFE), WILL (0xFB), WON’T (0xFC), etc. |
1 |
|
Option |
Option code (e.g., Echo = 0x01) |
1 |
|
Subnegotiation Packet
4 |
Subnegotiation Packet |
Used for complex option |
Variable |
---|---|---|---|
negotiation |
|||
IAC |
Start of command (0xFF) |
1 |
|
SB |
Subnegotiation Begin (0xFA) |
1 |
|
Option Code |
Option being negotiated |
1 |
|
Data |
Option-specific data |
Variable |
|
IAC SE |
End of subnegotiation (0xFF 0xF0) |
2 |
|
Telnet Control Commands
5 |
Telnet Control Commands |
Used for session control and |
2 |
---|---|---|---|
signaling |
|||
IAC |
0xFF |
1 |
|
Command |
e.g., NOP (0xF1), Break (0xF3) |
1 |
|
Telnet Option Codes
6 |
Telnet Option Codes |
Defines the meaning of the option |
3 |
---|---|---|---|
byte in negotiation |
|||
IAC |
Interpret As Command escape byte to indicate a Telnet command (0xFF) |
1 |
|
Command |
Negotiation command: DO, DONT, WILL, WONT |
1 |
|
Option Code |
Specifies the Telnet feature being negotiated (e.g., Echo, Terminal Type) |
1 |
|
Telnet Session Termination
7 |
Telnet Session Termination |
TCP FIN or RST used to close the |
TCP header |
---|---|---|---|
session |
(2060 bytes) |
||
FIN/RST |
TCP flag bits used to close the |
1 bit each |
|
connection |
(within 1-byte |
||
TCP flags field) |
|||
s.no |
Use Case |
Description |
---|---|---|
1 |
Remote Device Access |
Allows users to log into and control remote systems over a network. |
2 |
Network Equipment Configuration |
Used to configure routers, switches, and firewalls via command-line interface. |
3 |
Legacy System Management |
Still used in older systems that dont support SSH or modern protocols. |
4 |
Port Connectivity Testing |
Helps test if a specific TCP port is open on a remote host (e.g., telnet host 80). |
5 |
Educational Demonstrations |
Used in labs and classrooms to teach basic networking and terminal protocols. |
6 |
Simple Client-Server Testing |
Can simulate a basic client to test server responses (e.g., HTTP, SMTP). |
7 |
Debugging Services |
Useful for manually sending commands to services like SMTP, POP3, or HTTP. |
S.no |
Feature |
Description |
---|---|---|
1 |
Text-Based Communication |
Provides a command-line interface for remote communication using ASCII text. |
2 |
Remote Login |
Allows users to log into remote systems and interact as if locally connected. |
3 |
Port-Based Access |
Operates over TCP, typically on port 23, but can connect to any TCP port. |
4 |
Network Virtual Terminal (NVT) |
Standardizes communication between different systems. |
5 |
Option Negotiation |
Supports dynamic negotiation of features using commands like DO, WILL, etc. |
6 |
Subnegotiation Support |
Allows detailed configuration of options like terminal type, window size, etc. |
7 |
Cross-Platform Compatibility |
Works across various operating systems and hardware platforms. |
8 |
Simple Protocol Structure |
Lightweight and easy to implement for basic remote access needs. |
Text_based_Communication - Testcases
# |
Test Case |
Description |
Expected Result |
---|---|---|---|
1 |
Establish Telnet Session |
Connect to remote host |
Session established |
2 |
Send ASCII Text |
Send basic text command |
Command received |
3 |
Receive ASCII Text |
Receive response from server |
Response displayed |
4 |
Command Echo |
Verify command echoing |
Input echoed correctly |
5 |
Line Termination |
Test newline handling |
Proper line breaks |
6 |
Backspace Handling |
Test character deletion |
Characters removed |
7 |
Special Character Handling |
Send symbols like @#$% |
Symbols transmitted |
8 |
Case Sensitivity |
Send upper/lowercase |
Case preserved |
9 |
Command Prompt Display |
Check prompt visibility |
Prompt shown |
10 |
Session Timeout |
Leave session idle |
Session times out |
11 |
Session Reconnect |
Reconnect after timeout |
Session resumes |
12 |
Invalid Command Handling |
Send unknown command |
Error message shown |
13 |
Multi-line Input |
Send multi-line commands |
All lines processed |
14 |
Telnet Port Access |
Connect to port 23 |
Connection successful |
15 |
Telnet Banner Display |
Check welcome message |
Banner displayed |
16 |
Telnet Negotiation |
Verify option negotiation |
Options exchanged |
17 |
Telnet Escape Character |
Use escape key |
Control returned |
18 |
Telnet Session Logging |
Log session text |
Log file created |
19 |
Telnet Session Termination |
Exit session |
Connection closed |
20 |
Telnet with Localhost |
Connect to 127.0.0.1 |
Session established |
21 |
Telnet with Hostname |
Connect using DNS name |
Name resolved |
22 |
Telnet with IP Address |
Connect using IP |
IP accepted |
23 |
Telnet with IPv6 |
Connect using IPv6 address |
Session established |
24 |
Telnet with Firewall Enabled |
Attempt connection |
Blocked or allowed per rules |
25 |
Telnet with Logging Enabled |
Enable logging |
All text recorded |
26 |
Telnet with Different Shells |
Test bash, sh, cmd |
Shell responds correctly |
27 |
Telnet with User Authentication |
Login prompt appears |
Credentials accepted |
28 |
Telnet with Incorrect Credentials |
Enter wrong password |
Access denied |
29 |
Telnet with Session Banner |
Display custom banner |
Banner shown |
30 |
Telnet with Command History |
Use up/down arrows |
History navigated |
31 |
Telnet with Tab Completion |
Use tab for commands |
Completion works |
32 |
Telnet with Command Aliases |
Use aliases like ll |
Aliases executed |
33 |
Telnet with Environment Variables |
Echo $PATH or %PATH% |
Variables displayed |
34 |
Telnet with Color Output |
Use ANSI color codes |
Colors rendered |
35 |
Telnet with Unicode Characters |
Send non-ASCII text |
Characters handled or rejected |
36 |
Telnet with Line Editing |
Use Ctrl+U, Ctrl+A |
Editing works |
37 |
Telnet with Command Output Paging |
Use more, less |
Output paged |
38 |
Telnet with File Redirection |
Use > or >> |
Output redirected |
39 |
Telnet with Piping |
Use ` |
` to chain commands |
40 |
Telnet with Background Tasks |
Use & to run in background |
Task runs |
41 |
Telnet with Command Chaining |
Use && or ; |
Commands executed in order |
42 |
Telnet with Remote Shell Access |
Access shell remotely |
Shell prompt available |
43 |
Telnet with Command Output Logging |
Capture output |
Output saved |
44 |
Telnet with Session Encryption (via wrapper) |
Use SSL wrapper |
Encrypted session |
45 |
Telnet with Session Replay |
Replay logged session |
Output matches original |
46 |
Telnet with Command Injection Test |
Send malicious input |
Input sanitized or rejected |
47 |
Telnet with Session Monitoring |
Monitor session in real-time |
Output visible |
48 |
Telnet with Multiple Clients |
Connect from multiple terminals |
All sessions stable |
49 |
Telnet with Network Latency |
Simulate delay |
Session remains responsive |
50 |
Telnet with Packet Loss |
Simulate dropped packets |
Session recovers gracefully |
Remote Login - Testcases
# |
Test Case |
Description |
Expected Result |
---|---|---|---|
1 |
Remote Login with Valid Credentials |
Login with correct username/password |
Access granted |
2 |
Remote Login with Invalid Credentials |
Use wrong password |
Access denied |
3 |
Remote Login with Empty Credentials |
Leave fields blank |
Login rejected |
4 |
Remote Login with Locked Account |
Try logging into a locked account |
Access denied |
5 |
Remote Login with Expired Password |
Use expired credentials |
Prompt for password change |
6 |
Remote Login with Disabled Account |
Attempt login |
Access denied |
7 |
Remote Login with Multiple Users |
Simultaneous logins |
All sessions established |
8 |
Remote Login with Admin Privileges |
Login as admin |
Admin shell available |
9 |
Remote Login with Limited User |
Login as restricted user |
Limited access granted |
10 |
Remote Login with SSH Disabled |
Telnet enabled only |
Telnet login succeeds |
11 |
Remote Login with Hostname |
Connect using DNS name |
Login successful |
12 |
Remote Login with IP Address |
Connect using IP |
Login successful |
13 |
Remote Login with IPv6 Address |
Use IPv6 |
Session established |
14 |
Remote Login with Port 23 |
Default Telnet port |
Connection succeeds |
15 |
Remote Login with Custom Port |
Use non-standard port |
Login successful |
16 |
Remote Login with Network Latency |
Simulate delay |
Login still succeeds |
17 |
Remote Login with Packet Loss |
Simulate dropped packets |
Session recovers |
18 |
Remote Login with Firewall Enabled |
Port 23 open |
Login allowed |
19 |
Remote Login with Firewall Blocked |
Port 23 blocked |
Connection fails |
20 |
Remote Login with VPN |
Connect over VPN |
Session established |
21 |
Remote Login with NAT |
Behind NAT device |
Login successful |
22 |
Remote Login with Proxy |
Use Telnet proxy |
Session routed correctly |
23 |
Remote Login with Logging Enabled |
Enable session logs |
Login recorded |
24 |
Remote Login with Session Timeout |
Idle session |
Auto logout |
25 |
Remote Login with Session Reconnect |
Reconnect after drop |
Session resumes |
26 |
Remote Login with Session Lock |
Lock session manually |
Requires unlock |
27 |
Remote Login with Session Termination |
Kill session remotely |
Session ends |
28 |
Remote Login with Host Banner |
Display login banner |
Banner shown |
29 |
Remote Login with Host Message of the Day |
Show MOTD |
Message displayed |
30 |
Remote Login with Shell Access |
Access command shell |
Shell prompt available |
31 |
Remote Login with Restricted Shell |
Limited shell access |
Restrictions enforced |
32 |
Remote Login with Environment Variables |
Check $USER, $HOME |
Variables set |
33 |
Remote Login with Command Execution |
Run remote commands |
Output returned |
34 |
Remote Login with File Access |
Access remote files |
Files listed |
35 |
Remote Login with File Transfer |
Use cat or echo to transfer |
Data transferred |
36 |
Remote Login with Directory Navigation |
Use cd, ls |
Navigation works |
37 |
Remote Login with Process Monitoring |
Use ps, top |
Output displayed |
38 |
Remote Login with System Info |
Use uname, df |
Info retrieved |
39 |
Remote Login with User Switching |
Use su, sudo |
Privilege escalation |
40 |
Remote Login with Multiple Sessions |
Open multiple terminals |
All sessions stable |
41 |
Remote Login with Session Logging |
Log all commands |
Log file created |
42 |
Remote Login with Audit Trail |
Track user actions |
Audit logs updated |
43 |
Remote Login with Access Control |
Enforce login policies |
Access restricted |
44 |
Remote Login with Host Resource Limits |
Limit CPU/memory |
Limits enforced |
45 |
Remote Login with Host Reboot |
Reboot during session |
Session lost |
46 |
Remote Login with Host Shutdown |
Shutdown during session |
Session terminated |
47 |
Remote Login with Host Load |
High CPU load |
Login still possible |
48 |
Remote Login with Host Maintenance Mode |
Maintenance banner shown |
Login restricted |
49 |
Remote Login with Host Time Sync |
Check time consistency |
Time accurate |
50 |
Remote Login with Compliance Policy |
Enforce login rules |
Policy enforced |
Port Based Access - Testcases
# |
Test Case |
Description |
Expected Result |
---|---|---|---|
1 |
Connect to Default Port 23 |
Use standard Telnet port |
Connection successful |
2 |
Connect to Custom Port 2323 |
Use non-standard port |
Connection successful |
3 |
Connect to Closed Port |
Try a port with no service |
Connection refused |
4 |
Connect to HTTP Port 80 |
Connect to web server |
Raw HTTP response shown |
5 |
Connect to SMTP Port 25 |
Connect to mail server |
SMTP banner displayed |
6 |
Connect to FTP Port 21 |
Connect to FTP server |
FTP banner displayed |
7 |
Connect to SSH Port 22 |
Try connecting to SSH |
Binary/garbled output |
8 |
Connect to Echo Port 7 |
Test echo service |
Input echoed back |
9 |
Connect to Disallowed Port |
Blocked by firewall |
Connection blocked |
10 |
Connect to Open TCP Port |
Any open TCP port |
Connection succeeds |
11 |
Connect to UDP Port |
Try non-TCP port |
Connection fails |
12 |
Connect to Port with TLS |
Encrypted service |
Garbled output |
13 |
Connect to Port with Telnet Service |
Confirm Telnet is running |
Login prompt shown |
14 |
Connect to Port with No Listener |
No service bound |
Connection timeout |
15 |
Connect to Port with Rate Limiting |
Port under DoS protection |
Connection delayed or dropped |
16 |
Connect to Port with NAT |
Behind NAT device |
Connection successful |
17 |
Connect to Port with Port Forwarding |
Forwarded to another host |
Connection redirected |
18 |
Connect to Port with Load Balancer |
Behind load balancer |
Session established |
19 |
Connect to Port with Proxy |
Use Telnet proxy |
Connection routed |
20 |
Connect to Port with VPN |
Over VPN tunnel |
Connection successful |
21 |
Connect to Port with IPv4 |
Use IPv4 address |
Connection successful |
22 |
Connect to Port with IPv6 |
Use IPv6 address |
Connection successful |
23 |
Connect to Port with DNS Name |
Use hostname |
Name resolved |
24 |
Connect to Port with IP Address |
Use direct IP |
Connection successful |
25 |
Connect to Port with Port Knocking |
Requires sequence |
Access granted after knock |
26 |
Connect to Port with ACL |
Access control list applied |
Access allowed/denied |
27 |
Connect to Port with IDS/IPS |
Intrusion detection active |
Connection logged or blocked |
28 |
Connect to Port with Logging Enabled |
Log all connections |
Entry recorded |
29 |
Connect to Port with Banner |
Custom banner shown |
Banner displayed |
30 |
Connect to Port with Session Timeout |
Idle session |
Auto disconnect |
31 |
Connect to Port with Session Limit |
Max sessions reached |
Connection refused |
32 |
Connect to Port with Port Scan Detection |
Scan multiple ports |
Alert triggered |
33 |
Connect to Port with Firewall Logging |
Log blocked attempts |
Entry in firewall logs |
34 |
Connect to Port with Port Range |
Scan range of ports |
Open ports identified |
35 |
Connect to Port with Port Redirection |
Redirected to another port |
Connection successful |
36 |
Connect to Port with Port Mirroring |
Monitor traffic |
Telnet session visible |
37 |
Connect to Port with QoS |
Quality of Service applied |
Prioritized traffic |
38 |
Connect to Port with Rate Limiting |
Limit connections/sec |
Excess connections dropped |
39 |
Connect to Port with TCP Reset |
Server sends RST |
Connection closed |
40 |
Connect to Port with TCP Keepalive |
Keep session alive |
Session persists |
41 |
Connect to Port with TCP Window Scaling |
Large window sizes |
Data transferred efficiently |
42 |
Connect to Port with TCP Retransmission |
Simulate packet loss |
Retransmission occurs |
43 |
Connect to Port with TCP Congestion Control |
Under congestion |
Session adapts |
44 |
Connect to Port with TCP Fast Open |
Use TFO-enabled server |
Faster handshake |
45 |
Connect to Port with TLS Wrapper |
Use stunnel or similar |
Encrypted Telnet session |
46 |
Connect to Port with Port Filtering |
Only specific ports allowed |
Connection allowed/denied |
47 |
Connect to Port with Port-Based Authentication |
Auth required per port |
Prompt shown |
48 |
Connect to Port with Port-Specific Logging |
Log per-port activity |
Logs generated |
49 |
Connect to Port with Port-Specific Banner |
Unique banner per port |
Correct banner shown |
50 |
Connect to Port with Port-Based Access Control |
Role-based access |
Access granted/denied |
Network Virtual Terminal - Testcases
# |
Test Case |
Description |
Expected Result |
---|---|---|---|
1 |
NVT Character Set Support |
Use standard ASCII characters |
Characters transmitted correctly |
2 |
NVT Line Termination |
Use CR+LF for new lines |
New lines rendered properly |
3 |
NVT Backspace Handling |
Send backspace character |
Character deleted |
4 |
NVT Null Character Handling |
Send null byte |
Ignored as per spec |
5 |
NVT Control Characters |
Send Ctrl+C, Ctrl+Z |
Control signals interpreted |
6 |
NVT Printable Characters |
Send all printable ASCII |
Displayed correctly |
7 |
NVT Command Interpretation |
Interpret Telnet commands |
Commands processed |
8 |
NVT Option Negotiation |
Negotiate options like ECHO |
Agreement reached |
9 |
NVT Binary Mode Disabled |
Ensure ASCII-only mode |
Non-ASCII rejected |
10 |
NVT Binary Mode Enabled |
Allow binary transmission |
Binary data accepted |
11 |
NVT Echo Option |
Enable/disable echo |
Echo behavior changes |
12 |
NVT Suppress Go Ahead |
Test with option enabled |
No GA character sent |
13 |
NVT Terminal Type Negotiation |
Request terminal type |
Type returned |
14 |
NVT Window Size Negotiation |
Exchange terminal size |
Size updated |
15 |
NVT Environment Variable Negotiation |
Exchange env vars |
Variables received |
16 |
NVT Status Request |
Request session status |
Status returned |
17 |
NVT Timing Mark |
Send timing mark |
Response received |
18 |
NVT Flow Control |
Test XON/XOFF |
Flow controlled |
19 |
NVT Interrupt Process |
Send IP command |
Process interrupted |
20 |
NVT Abort Output |
Send AO command |
Output suppressed |
21 |
NVT Are You There |
Send AYT command |
Response received |
22 |
NVT Erase Character |
Send EC command |
Character erased |
23 |
NVT Erase Line |
Send EL command |
Line erased |
24 |
NVT Break Signal |
Send BRK command |
Break signal sent |
25 |
NVT Subnegotiation |
Use subnegotiation for options |
Data exchanged |
26 |
NVT Option Refusal |
Refuse unsupported option |
Refusal acknowledged |
27 |
NVT Option Acceptance |
Accept supported option |
Option enabled |
28 |
NVT Option Toggle |
Enable/disable option mid-session |
Behavior changes |
29 |
NVT Option Conflict |
Send conflicting options |
Conflict resolved |
30 |
NVT Option Timeout |
No response to negotiation |
Timeout handled |
31 |
NVT Option Retry |
Retry failed negotiation |
Retry succeeds |
32 |
NVT Option Logging |
Log all negotiations |
Log file created |
33 |
NVT Option Order |
Send options in sequence |
Order preserved |
34 |
NVT Option Compression |
Use compressed negotiation |
Data interpreted |
35 |
NVT Option Encryption |
Use encrypted negotiation |
Data secured |
36 |
NVT Option Authentication |
Authenticate during negotiation |
Auth successful |
37 |
NVT Option Rejection Logging |
Log rejected options |
Entry recorded |
38 |
NVT Option Compatibility |
Test across OS types |
Compatible behavior |
39 |
NVT Option with Legacy Client |
Use old Telnet client |
Session works |
40 |
NVT Option with Modern Client |
Use modern Telnet client |
Session works |
41 |
NVT Option with Custom Client |
Use custom-built client |
NVT compliance verified |
42 |
NVT Option with Telnet Proxy |
Use proxy in between |
NVT preserved |
43 |
NVT Option with NAT |
Behind NAT |
NVT negotiation succeeds |
44 |
NVT Option with IPv6 |
Use IPv6 transport |
NVT works |
45 |
NVT Option with IPv4 |
Use IPv4 transport |
NVT works |
46 |
NVT Option with High Latency |
Simulate delay |
NVT still functions |
47 |
NVT Option with Packet Loss |
Simulate loss |
NVT recovers |
48 |
NVT Option with Session Resume |
Resume session |
NVT state restored |
49 |
NVT Option with Session Logging |
Log all NVT traffic |
Log complete |
50 |
NVT Option with Compliance Test |
Validate against RFC 854 |
Fully compliant |
Option Negotiation - Testcases
# |
Test Case |
Description |
Expected Result |
---|---|---|---|
1 |
Send DO Command |
Request server to enable option |
Server responds with WILL or WONT |
2 |
Send DONT Command |
Request server to disable option |
Server responds with WONT |
3 |
Send WILL Command |
Offer to enable option |
Server responds with DO or DONT |
4 |
Send WONT Command |
Refuse to enable option |
Server acknowledges |
5 |
Echo Option Negotiation |
Negotiate ECHO option |
Echo enabled/disabled |
6 |
Suppress Go Ahead Option |
Negotiate SGA option |
GA character suppressed |
7 |
Terminal Type Option |
Request terminal type |
Terminal type returned |
8 |
Window Size Option |
Negotiate window size |
Size exchanged |
9 |
Terminal Speed Option |
Request terminal speed |
Speed returned |
10 |
Remote Flow Control Option |
Enable flow control |
Flow control active |
11 |
Linemode Option |
Enable line mode |
Line mode activated |
12 |
Environment Option |
Exchange environment variables |
Variables received |
13 |
Status Option |
Request session status |
Status returned |
14 |
Timing Mark Option |
Send timing mark |
Response received |
15 |
Negotiate Multiple Options |
Send multiple DO/WILL |
All options negotiated |
16 |
Unsupported Option Request |
Request unknown option |
Server responds with WONT |
17 |
Option Negotiation Timeout |
No response to DO |
Timeout handled |
18 |
Option Negotiation Retry |
Retry failed negotiation |
Retry succeeds |
19 |
Option Negotiation Logging |
Log all negotiation commands |
Log file created |
20 |
Option Negotiation Order |
Send options in sequence |
Order preserved |
21 |
Option Negotiation with Legacy Server |
Use old Telnet server |
Negotiation succeeds |
22 |
Option Negotiation with Modern Server |
Use updated server |
Negotiation succeeds |
23 |
Option Negotiation with Custom Client |
Use custom-built client |
Options negotiated |
24 |
Option Negotiation with Proxy |
Proxy in path |
Options preserved |
25 |
Option Negotiation with NAT |
Behind NAT |
Options negotiated |
26 |
Option Negotiation with IPv6 |
Use IPv6 transport |
Options exchanged |
27 |
Option Negotiation with IPv4 |
Use IPv4 transport |
Options exchanged |
28 |
Option Negotiation with Encryption Wrapper |
Use stunnel or SSL |
Options still negotiated |
29 |
Option Negotiation with Packet Loss |
Simulate loss |
Retransmission occurs |
30 |
Option Negotiation with High Latency |
Simulate delay |
Options negotiated |
31 |
Option Negotiation with Firewall |
Firewall in path |
Options allowed/blocked |
32 |
Option Negotiation with IDS/IPS |
Intrusion detection active |
Negotiation logged |
33 |
Option Negotiation with Logging Enabled |
Enable verbose logs |
Commands recorded |
34 |
Option Negotiation with Logging Disabled |
Disable logs |
No logs created |
35 |
Option Negotiation with Session Resume |
Resume session |
Options re-negotiated |
36 |
Option Negotiation with Session Timeout |
Idle session |
Options renegotiated |
37 |
Option Negotiation with Session Termination |
End session mid-negotiation |
Session closed cleanly |
38 |
Option Negotiation with Session Reconnect |
Reconnect session |
Options renegotiated |
39 |
Option Negotiation with Telnet Daemon |
Use telnetd |
Options handled |
40 |
Option Negotiation with Busy Server |
High load |
Options still negotiated |
41 |
Option Negotiation with Multiple Clients |
Simultaneous sessions |
All options handled |
42 |
Option Negotiation with Invalid Sequence |
Send malformed DO/WILL |
Server ignores or rejects |
43 |
Option Negotiation with Repeated Commands |
Send DO repeatedly |
Server handles gracefully |
44 |
Option Negotiation with Conflicting Commands |
Send DO and DONT |
Conflict resolved |
45 |
Option Negotiation with Custom Option Code |
Use non-standard code |
Server responds appropriately |
46 |
Option Negotiation with Telnet Client Library |
Use libtelnet or similar |
Options negotiated |
47 |
Option Negotiation with Telnet over Serial |
Use serial-to-TCP bridge |
Options negotiated |
48 |
Option Negotiation with Telnet over VPN |
Use VPN tunnel |
Options negotiated |
49 |
Option Negotiation with Compliance Test |
Validate against RFC 854/855 |
Fully compliant |
50 |
Option Negotiation with Security Policy |
Enforce allowed options only |
Policy enforced |
Subnegotiation support - Testcases
# |
Test Case |
Description |
Expected Result |
---|---|---|---|
1 |
Terminal Type Request |
Request terminal type |
Type returned (e.g., VT100) |
2 |
Terminal Type Response |
Server sends terminal type |
Client accepts |
3 |
Window Size Request |
Request window dimensions |
Size returned |
4 |
Window Size Change |
Resize terminal window |
Update sent via subnegotiation |
5 |
Environment Variable Request |
Request env vars |
Variables returned |
6 |
Environment Variable Response |
Server sends env vars |
Client parses correctly |
7 |
Terminal Speed Request |
Request baud rate |
Speed returned |
8 |
Terminal Speed Response |
Server sends speed |
Client accepts |
9 |
Linemode Subnegotiation |
Enable line mode |
Line mode activated |
10 |
Status Subnegotiation |
Request status |
Status returned |
11 |
Terminal Type Negotiation Loop |
Multiple requests |
All handled correctly |
12 |
Window Size Negotiation Loop |
Multiple updates |
All processed |
13 |
Subnegotiation with Legacy Client |
Use old Telnet client |
Subnegotiation succeeds |
14 |
Subnegotiation with Modern Client |
Use updated client |
Subnegotiation succeeds |
15 |
Subnegotiation with Custom Client |
Use custom-built client |
Data exchanged correctly |
16 |
Subnegotiation with Proxy |
Proxy in path |
Data preserved |
17 |
Subnegotiation with NAT |
Behind NAT |
Subnegotiation succeeds |
18 |
Subnegotiation with IPv6 |
Use IPv6 transport |
Data exchanged |
19 |
Subnegotiation with IPv4 |
Use IPv4 transport |
Data exchanged |
20 |
Subnegotiation with Encryption Wrapper |
Use SSL wrapper |
Data encrypted |
21 |
Subnegotiation with Packet Loss |
Simulate loss |
Retransmission occurs |
22 |
Subnegotiation with High Latency |
Simulate delay |
Data still exchanged |
23 |
Subnegotiation with Firewall |
Firewall in path |
Data allowed/blocked |
24 |
Subnegotiation with IDS/IPS |
Intrusion detection active |
Logged or allowed |
25 |
Subnegotiation with Logging Enabled |
Enable verbose logs |
Data recorded |
26 |
Subnegotiation with Logging Disabled |
Disable logs |
No logs created |
27 |
Subnegotiation with Session Resume |
Resume session |
Subnegotiation reinitiated |
28 |
Subnegotiation with Session Timeout |
Idle session |
Subnegotiation ends |
29 |
Subnegotiation with Session Termination |
End session mid-subnegotiation |
Session closed cleanly |
30 |
Subnegotiation with Session Reconnect |
Reconnect session |
Data re-exchanged |
31 |
Subnegotiation with Telnet Daemon |
Use telnetd |
Subnegotiation supported |
32 |
Subnegotiation with Busy Server |
High load |
Subnegotiation succeeds |
33 |
Subnegotiation with Multiple Clients |
Simultaneous sessions |
All subnegotiations succeed |
34 |
Subnegotiation with Invalid Data |
Send malformed data |
Server rejects or ignores |
35 |
Subnegotiation with Repeated Requests |
Send same request repeatedly |
Server handles gracefully |
36 |
Subnegotiation with Conflicting Data |
Send conflicting values |
Conflict resolved |
37 |
Subnegotiation with Custom Option Code |
Use non-standard code |
Server responds appropriately |
38 |
Subnegotiation with Telnet Client Library |
Use libtelnet or similar |
Data exchanged |
39 |
Subnegotiation with Telnet over Serial |
Use serial-to-TCP bridge |
Subnegotiation succeeds |
40 |
Subnegotiation with Telnet over VPN |
Use VPN tunnel |
Data exchanged |
41 |
Subnegotiation with Compliance Test |
Validate against RFC 1091 |
Fully compliant |
42 |
Subnegotiation with Security Policy |
Enforce allowed options only |
Policy enforced |
43 |
Subnegotiation with Terminal Emulation |
Emulate VT100, xterm |
Emulation supported |
44 |
Subnegotiation with Terminal Capabilities |
Exchange capabilities |
Data interpreted |
45 |
Subnegotiation with Terminal Reset |
Reset terminal mid-session |
Subnegotiation reinitiated |
46 |
Subnegotiation with Terminal Refresh |
Refresh screen |
Data re-sent |
47 |
Subnegotiation with Terminal Scroll |
Scroll window |
Size update sent |
48 |
Subnegotiation with Terminal Font Change |
Change font settings |
Font info exchanged |
49 |
Subnegotiation with Terminal Color Support |
Exchange color capabilities |
Colors supported |
50 |
Subnegotiation with Terminal Input Mode |
Switch input modes |
Mode updated |
Cross Platform Compatiblity - Testcases
# |
Test Case |
Description |
Expected Result |
---|---|---|---|
1 |
Telnet on Windows |
Use built-in or third-party client |
Session established |
2 |
Telnet on Linux |
Use telnet command |
Session established |
3 |
Telnet on macOS |
Use Terminal app |
Session established |
4 |
Telnet on FreeBSD |
Use native client |
Session established |
5 |
Telnet on Solaris |
Use system client |
Session established |
6 |
Telnet on Android (via Termux) |
Use Telnet package |
Session established |
7 |
Telnet on iOS (via SSH app) |
Use Telnet-capable app |
Session established |
8 |
Telnet on Embedded Linux |
Use BusyBox Telnet |
Session established |
9 |
Telnet on Raspberry Pi |
Use Raspbian OS |
Session established |
10 |
Telnet on ARM Architecture |
Use ARM-based device |
Session established |
11 |
Telnet on x86 Architecture |
Use standard PC |
Session established |
12 |
Telnet on x64 Architecture |
Use 64-bit system |
Session established |
13 |
Telnet on MIPS Architecture |
Use router OS |
Session established |
14 |
Telnet on PowerPC |
Use legacy hardware |
Session established |
15 |
Telnet on Virtual Machine |
Use VM (e.g., VirtualBox) |
Session established |
16 |
Telnet on Docker Container |
Use containerized client |
Session established |
17 |
Telnet on WSL (Windows Subsystem for Linux) |
Use Linux Telnet in WSL |
Session established |
18 |
Telnet on Cloud VM |
Use AWS/GCP/Azure instance |
Session established |
19 |
Telnet on Chromebook |
Use Linux shell |
Session established |
20 |
Telnet on Smart TV OS |
Use developer shell |
Session established |
21 |
Telnet on Network Switch |
Use CLI interface |
Session established |
22 |
Telnet on Router Firmware |
Use OpenWRT/DD-WRT |
Session established |
23 |
Telnet on IoT Device |
Use Telnet-enabled firmware |
Session established |
24 |
Telnet on Game Console Dev Kit |
Use debug shell |
Session established |
25 |
Telnet on Legacy OS (e.g., Windows XP) |
Use built-in client |
Session established |
26 |
Telnet on Modern OS (e.g., Windows 11) |
Use optional feature |
Session established |
27 |
Telnet Server on Linux |
Host Telnet server |
Accepts connections |
28 |
Telnet Server on Windows |
Use third-party server |
Accepts connections |
29 |
Telnet Server on macOS |
Use telnetd |
Accepts connections |
30 |
Telnet Server on Embedded Device |
Use BusyBox server |
Accepts connections |
31 |
Telnet Server on Virtual Machine |
Host server in VM |
Accepts connections |
32 |
Telnet Server on Docker |
Host server in container |
Accepts connections |
33 |
Telnet Server on Cloud |
Host server in cloud |
Accepts connections |
34 |
Telnet Server on IPv4 |
Use IPv4 address |
Connection successful |
35 |
Telnet Server on IPv6 |
Use IPv6 address |
Connection successful |
36 |
Telnet Server on NAT |
Behind NAT |
Connection successful |
37 |
Telnet Server on VPN |
Use VPN tunnel |
Connection successful |
38 |
Telnet Server on Firewall |
Allow port 23 |
Connection successful |
39 |
Telnet Server with Logging |
Enable logs |
Cross-platform logs recorded |
40 |
Telnet Server with Authentication |
Require login |
Auth works across OSes |
41 |
Telnet Server with Encryption Wrapper |
Use stunnel |
Secure session |
42 |
Telnet Client with Unicode Support |
Send UTF-8 |
Characters handled |
43 |
Telnet Client with ANSI Support |
Use ANSI codes |
Colors rendered |
44 |
Telnet Client with Keyboard Mapping |
Test key inputs |
Keys mapped correctly |
45 |
Telnet Client with Locale Settings |
Use different locales |
Session adapts |
46 |
Telnet Client with Timezone Settings |
Use different timezones |
Time displayed correctly |
47 |
Telnet Client with Accessibility Tools |
Use screen reader |
Text accessible |
48 |
Telnet Client with Scripting |
Automate login |
Script executes |
49 |
Telnet Client with GUI Wrapper |
Use GUI-based Telnet |
Session functional |
50 |
Telnet Client with Compliance Test |
Validate RFC compatibility |
Fully compliant |
Simple Protocol structure - Testcases
# |
Test Case |
Description |
Expected Result |
---|---|---|---|
1 |
Minimal Packet Size |
Send basic command |
Small packet transmitted |
2 |
Basic ASCII Command |
Send ls, dir, etc. |
Command executed |
3 |
No Encryption Overhead |
Inspect packet |
Plain text visible |
4 |
No Handshake Required |
Connect directly |
Session starts immediately |
5 |
No Certificate Exchange |
Inspect connection |
No TLS/SSL negotiation |
6 |
Simple Command Parsing |
Send valid command |
Parsed and executed |
7 |
Simple Error Handling |
Send invalid command |
Error message returned |
8 |
No Client Installation |
Use built-in client |
Works out of the box |
9 |
No Server Configuration |
Use default telnetd |
Accepts connections |
10 |
Lightweight Memory Usage |
Monitor RAM |
Low memory footprint |
11 |
Lightweight CPU Usage |
Monitor CPU |
Minimal usage |
12 |
No GUI Required |
Use CLI only |
Fully functional |
13 |
No Dependencies |
Run Telnet client |
No external libraries needed |
14 |
Simple Port Access |
Use port 23 |
Connection succeeds |
15 |
Simple Protocol Stack |
Use TCP only |
No additional layers |
16 |
Simple Session Start |
Connect and login |
Immediate access |
17 |
Simple Session End |
Type exit |
Session closes |
18 |
Simple Text Output |
Run command |
Output in plain text |
19 |
Simple Input Handling |
Type command |
Input accepted |
20 |
Simple Prompt Display |
Show shell prompt |
Prompt visible |
21 |
Simple Authentication |
Username/password |
Login successful |
22 |
Simple Logging |
Enable session log |
Text recorded |
23 |
Simple Scripting |
Automate with script |
Script runs successfully |
24 |
Simple Debugging |
Use packet sniffer |
Easy to trace |
25 |
Simple Protocol Analysis |
Use Wireshark |
Protocol easily decoded |
26 |
Simple Protocol Documentation |
Refer to RFC 854 |
Easy to understand |
27 |
Simple Option Negotiation |
Use DO/WILL |
Options exchanged |
28 |
Simple Subnegotiation |
Exchange terminal type |
Data received |
29 |
Simple Echo Test |
Enable echo |
Input echoed |
30 |
Simple Go-Ahead Suppression |
Enable SGA |
GA suppressed |
31 |
Simple Terminal Emulation |
Use VT100 |
Emulation works |
32 |
Simple Command History |
Use up arrow |
Previous command shown |
33 |
Simple Line Editing |
Use backspace |
Text edited |
34 |
Simple Session Timeout |
Idle session |
Auto logout |
35 |
Simple Session Reconnect |
Reconnect after drop |
Session resumes |
36 |
Simple Port Redirection |
Forward port 23 |
Connection redirected |
37 |
Simple NAT Traversal |
Behind NAT |
Session works |
38 |
Simple Firewall Rule |
Allow port 23 |
Connection succeeds |
39 |
Simple Proxy Use |
Use Telnet proxy |
Session routed |
40 |
Simple IPv4 Support |
Use IPv4 address |
Connection succeeds |
41 |
Simple IPv6 Support |
Use IPv6 address |
Connection succeeds |
42 |
Simple Localhost Access |
Connect to 127.0.0.1 |
Session established |
43 |
Simple Remote Access |
Connect to remote host |
Session established |
44 |
Simple Multi-Platform Use |
Use on any OS |
Works consistently |
45 |
Simple Embedded Use |
Use on microcontroller |
Session works |
46 |
Simple Cloud Use |
Use on cloud VM |
Session works |
47 |
Simple Container Use |
Use in Docker |
Session works |
48 |
Simple VM Use |
Use in virtual machine |
Session works |
49 |
Simple Compliance Check |
Validate RFC 854 |
Protocol compliant |
50 |
Simple Educational Use |
Teach protocol basics |
Easy to demonstrate |
Reference links