What is TELNET: Telnet Commands, Telnet Options and Telnet Logins

What is TELNET: Telnet Commands, Telnet Options and Telnet Logins

7 mins read713 Views Comment
Jaya
Jaya Sharma
Assistant Manager - Content
Updated on Oct 17, 2024 13:38 IST

It is a network protocol that is used for virtually accessing computer and providing two-way text based communication channel between two machines. TELNET follows user command Transmission Control Protocol to create remote sessions.

2023_03_MicrosoftTeams-image-171.jpg

In this article, we will learn what is TELNET, Telnet command in computer networks, Telnet options, and types of login.

Recommended online courses

Best-suited Networking courses for you

Learn Networking with these high-rated online courses

Free
70 hours
โ€“ / โ€“
โ€“ / โ€“
โ€“ / โ€“
12 weeks
Free
22 hours
Free
12 weeks
โ€“ / โ€“
6 months
โ€“ / โ€“
17 hours
Free
8 weeks

Table of Contents

Key Highlights

  • What is TELNET?: TELNET, or Teletype Network, is a network protocol enabling remote access and two-way text-based communication between computers.
  • Characteristics: Bidirectional communication, character-oriented, and text-only protocol suitable for interactive sessions.
  • Telnet Commands List: Includes open, close, quit, set, send, and more for managing connections and settings.
  • Telnet Options: Negotiated between client and server for features like binary transmission, echo, and terminal type determination.
  • Types of Login: Differentiates between local and remote logins, describing their operational processes.
  • Working: Describes how TELNET establishes and manages connections over TCP/IP.
  • Limitations: Addresses security vulnerabilities like plaintext transmission and lack of encryption.

Let us first start by understanding what is Telnet. 

What is TELNET?

TELNET (Teletype Network) is a network protocol for enabling computers to connect to local computer. Here, the computer that starts the connection is referred to as the local computer. Here, the computer that accepts the connection is known as a remote computer. Here, the local computer uses the TELNET client program and remote computers use TELNET server program.

It provides access to virtual terminals of remote systems on the LAN or internet. This protocol is used by terminal emulation programs that help us in logging into a remote host. It can be used for the purpose of terminal-to-terminal and interprocess communication. It is used by other protocols for the purpose of establishing protocol control channels.

Characteristics of Telnet

  • Telnet is a two-way protocol since it establishes a bidirectional communication channel between client and server. This allows both sides to send as well as receive data simultaneously in real-time.
  • The Telnet protocol is character-oriented in nature. This means that every character typed by user gets immediately transmitted to the server. This allows real-time interaction followed by immediate feedback. Telnet uses Network Virtual Terminal (NVT) for standardizing character representation and handling different character sets including special control characters such as line feed, carriage return and backspace.
  • Telent is a text-only protocol which means that users can neither perform actions such as file transfer or view any graphics on Telnet.
  • This protocol is designed for live user interactions which require commands to be entered manually and responses to be displayed promptly for the user to read and react to.

Telnet Commands Lists

The following are the Telnet commands lists used for initiating an action on the protocol,

  1. open [hostname/IP address] [port]: Connects to a remote host. The port is optional and defaults to 23, the standard port for Telnet.
  2. close: Closes the current connection.
  3. quit: Exits the Telnet client.
  4. display: Shows the current Telnet client settings.
  5. set: Allows you to change the settings of your Telnet session. Some commonly used options with the set command include:
    • set localecho: Displays the characters you type (useful if the server doesnโ€™t echo your input).
    • set term [type]: Sets the terminal type (e.g., ANSI, VT100).
  6. unset: Reverses the effect of the set command for a particular option.
  7. send: Sends special sequences to the Telnet server. Some options include:
    • send break: Sends the BREAK sequence.
    • send interrupt: Sends the IP sequence.
    • send escape: Sends the current escape character.
  8. status: Displays the status of the current Telnet session.
  9. mode [type]: Sets the mode of the Telnet session. Common types include:
    • mode character: Sets character-at-a-time mode.
    • mode line: Sets line-by-line mode.
  10. escape [character]: Sets the escape character (default is Ctrl+]).
  11. log [filename]: Starts logging the Telnet session to a specified file.
  12. ? or help: Displays a list of available Telnet commands.

Syntax of Telnet Commands

Telnet commands have the following syntax:

Windows: 

C:Usersadministrator>telnet domainname.com 1024

Mac OS X:

Macintosh:~ administrator$ telnet domainname.com 1024

Linux:

root@linux:~# telnet domainname.com 1024

Telnet Command Byte Code

The following table mentions the byte code of Telnet basic commands:

Telnet Command Name Byte code of Telnet Command
SE 240
NOP 241
Data Mark 242
Break 243
Interrupt Process 244
Abort output 245
Are you there? 246
Erase character 247
Erase Line 248
Go ahead 249
SB 250
WILL 251
WONโ€™T 252
DO 253
DONโ€™T 254

TELNET Options

The following Telnet options are negotiated between client and server:

Telnet Command Options Description
BINARY TRANSMISSION (Used in tn3270 sessions) Transmit characters as binary data.
SUPPRESS GO_AHEAD (The operating system suppresses GO-AHEAD options.) Indicates that when it is in effect on a connection between the data sender and receiver, sender does not need to transmit a GO_AHEAD option. In case the GO_AHEAD option is not required, parties in the connection may suppress it in both directions. This action must take place independently in both directions.
TIMING MARK (Recognized, but has a negative response) Ensures that the previously transmitted data is completely processed.
EXTENDED OPTIONS LIST Extends TELNET option list for 256 other options. Without this option, TELNET option only allows 256 options.
ECHO (User-changeable command) Transmits already received echo data characters back to its original sender.
TERM TYPE Enables server to determine terminal type that is connected to a user TELNET program.
SAK (Secure Attention Key) Establishes an environment that is necessary for secure communication between user and the system.
NAWS (Negotiate About Window Size) Enables clients and server to dynamically negotiate for the window size. This is used by applications that support changing window size.

Types of Login

In TELNET, there are the following types of logins:

Local Login

This type of login occurs whenever a person logs into the local computer. The terminal driver accepts keystrokes that are entered by user when workstation is running a terminal emulator. Here, the terminal driver forwards these characters to the operating system that launches the required application software.

Remote Login 

The user primarily transmits the keystroke to terminal driver, where the operating system only receives but does not understand characters. These characters are then transferred to client that converts these characters into Network Virtual Terminal (NVT) characters. 

After conversion, the client converts them and sends them back to TCP/IP stack. The text in NVT form travels via the internet till it reaches TCP/IP protocol stack on a distant system. The server converts these NVT characters into characters that remote machines can understand.

Explore operating system courses

How Does It Work?

It works in the following steps:

  • Users get a bidirectional interactive text-oriented communication system that utilises a virtual terminal connection over 8 bytes. 
  • The user data is interspersed in-band with TELNET control information over Transmission Control Protocol (TCP). 
  • It is often used on a terminal for executing functions remotely. 
  • Here, users connect to the server using the TELNET protocol. 
  • For this purpose, a command prompt is entered by following the syntax โ€˜TELNET hostname portโ€™. 
  • The user executes commands on the server using certain commands into the prompt. 
  • For ending a session and logging off, the user terminates a command with TELNET.
What is the OSPF Protocol?
What is the OSPF Protocol?
Have you ever considered how network devices, such as routers, can determine the best (shortest) path for data travel from one device to another? It is because of the OSPF...read more
TCP vs UDP: Whatโ€™s the Difference?
TCP vs UDP: Whatโ€™s the Difference?
TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) are widely used Internet protocols. They are the different methods that specify how data transmits between 2 entities across the internet....read more
Difference between Public and Private IP Address
Difference between Public and Private IP Address
Just as your public home address helps others find you in the physical world, a public IP address acts as a beacon on the internet, allowing devices to communicate with...read more

Limitations of TELNET

The following are the limitations of TELNET:

  • It transmits all information, including usernames and passwords in plaintext due to which it is not recommended for security-sensitive applications.
  • It is vulnerable to a network-based cyberattack which can be exploited to leak information about the server by packet sniffing the banner. If it is improperly configured, then it may be exploited by the malware. 
  • This network protocol does not encrypt any data that is sent over a connection due to which it can be read by attackers in case they have access to hub, switch, router or gateway
  • Many implementations do not have authentication due to which it allows unrestricted access to the system. 

FAQs

How do I use the Telnet command?

The basic syntax is: telnet [host] [port]. For example: telnet example.com 23

What is the default port for Telnet?

The default port for Telnet is port 23.

Is Telnet secure?

No, Telnet is not secure because it transmits data in plain text. It's recommended to use SSH instead for secure remote access.

How do I exit a Telnet session?

Type "quit" or "exit" and press Enter, or use the keyboard shortcut Ctrl+] followed by "quit".

Can Telnet be used to test open ports?

Yes, Telnet can be used to check if a specific port on a remote system is open and accessible.

About the Author
author-image
Jaya Sharma
Assistant Manager - Content

Jaya is a writer with an experience of over 5 years in content creation and marketing. Her writing style is versatile since she likes to write as per the requirement of the domain. She has worked on Technology, Fina... Read Full Bio