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.
In this article, we will learn what is TELNET, its commands, options, and types of login.
Table of Contents
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.
Telnet Command Lists
- open [hostname/IP address] [port]: Connects to a remote host. The port is optional and defaults to 23, the standard port for Telnet.
- close: Closes the current connection.
- quit: Exits the Telnet client.
- display: Shows the current Telnet client settings.
- 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).
- unset: Reverses the effect of the set command for a particular option.
- 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.
- status: Displays the status of the current Telnet session.
- 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.
- escape [character]: Sets the escape character (default is Ctrl+]).
- log [filename]: Starts logging the Telnet session to a specified file.
- ? or help: Displays a list of available Telnet commands.
Command Byte Code
|Are you there?||246|
The following options are negotiated between client and server:
|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:
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.
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.
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.
Download this article as PDF to read offlineDownload as PDF