Telnet (sometimes stylized TELNET
) is a
client-server application protocol that provides access to virtual
terminals of
remote systems on
local area networks or the
Internet
The Internet (or internet) is the Global network, global system of interconnected computer networks that uses the Internet protocol suite (TCP/IP) to communicate between networks and devices. It is a internetworking, network of networks ...
.
It is a protocol for bidirectional 8-bit communications. Its main goal was to connect terminal devices and terminal-oriented processes.
The name "Telnet" refers to two things: a protocol itself specifying how two parties are to communicate and a software application that implements the protocol as a service.
User data is interspersed
in-band with Telnet control information in an 8-bit
byte oriented data connection over the
Transmission Control Protocol
The Transmission Control Protocol (TCP) is one of the main communications protocol, protocols of the Internet protocol suite. It originated in the initial network implementation in which it complemented the Internet Protocol (IP). Therefore, th ...
(TCP). Telnet transmits all information including usernames and passwords in plaintext so it is not recommended for security-sensitive applications such as
remote management of routers.
Telnet's use for this purpose has waned significantly in favor of
SSH. Some extensions to Telnet which would provide encryption have been proposed.
Description
The telnet protocol is a
client-server protocol that runs on a
reliable connection-oriented transport. Most often, a telnet client connects over
TCP to
port
A port is a maritime facility comprising one or more wharves or loading areas, where ships load and discharge cargo and passengers. Although usually situated on a sea coast or estuary, ports can also be found far inland, such as Hamburg, Manch ...
23 or 2323, where a Telnet server application is listening.
The Telnet protocol abstracts any terminal as a Network Virtual Terminal (NVT). The client must simulate a NVT using the
NVT codes when messaging the server.
Telnet predated UDP/IP and originally ran over
Network Control Protocol (NCP). The telnet service is best understood in the context of a user with a simple terminal using the local Telnet program (known as the client program) to run a logon session on a remote computer where the user's communications needs are handled by a Telnet server program.
Telnet service
A Telnet service is an application providing services over the Telnet protocol. Most operating systems provide a service that can be installed or enabled to provide Telnet services to clients.
Name
While the official specification stylizes the name as TELNET, it is not defined therein as an acronym or abbreviation.
In a 1972 paper, when discussing one of the early forms of the protocol,
Stephen Crocker et al. used "TELNET" explicitly as an abbreviation of "telecommunications network."
In his 2015 book ''WHOIS Running the Internet: Protocol, Policy, and Privacy'', Internet researcher Garth O. Bruen claims that Telnet was originally short for "Teletype Over Network Protocol."
History
Telnet was originally developed for
ARPANET
The Advanced Research Projects Agency Network (ARPANET) was the first wide-area packet-switched network with distributed control and one of the first computer networks to implement the TCP/IP protocol suite. Both technologies became the tec ...
in 1969.
Initially, it was an ad hoc protocol with no formal specification, but after extensive work in the 1970s, including numerous RFCs, it was officially formalized in and , which together form internet standard 8.
Since then, many additional RFCs have updated or extended the Telnet specification, both to address issues in the original standard and to add new capabilities.
Some of these extensions have also been adopted as
Internet standard
In computer network engineering, an Internet Standard is a normative specification of a technology or methodology applicable to the Internet. Internet Standards are created and published by the Internet Engineering Task Force (IETF). They allow ...
s, particularly standards 27 through 32 (see
below).
Security vulnerabilities
Telnet is vulnerable to
network-based cyberattacks, such as
packet sniffing sensitive information including passwords and
fingerprinting.
Telnet services can also be exploited to leak information about the server (such as hostnames, IP addresses and brand) by packet sniffing the banner. This information can then be searched to determine if a Telnet service accepts a connection without
authentication
Authentication (from ''authentikos'', "real, genuine", from αὐθέντης ''authentes'', "author") is the act of proving an Logical assertion, assertion, such as the Digital identity, identity of a computer system user. In contrast with iden ...
. Telnet is also frequently exploited by
malware
Malware (a portmanteau of ''malicious software'')Tahir, R. (2018)A study on malware and malware detection techniques . ''International Journal of Education and Management Engineering'', ''8''(2), 20. is any software intentionally designed to caus ...
due to being improperly configured.
In fact, Telnet is targeted by attackers more frequently than other common protocols, especially when compared to
UPnP
Universal Plug and Play (UPnP) is a set of networking protocols on the Internet Protocol (IP) that permits networked devices, such as personal computers, printers, Gateway (telecommunications), Internet gateways, Wi-Fi access points and mobile de ...
,
CoAP,
MQTT,
AMQP and
XMPP
Extensible Messaging and Presence Protocol (abbreviation XMPP, originally named Jabber) is an Open standard, open communication protocol designed for instant messaging (IM), presence information, and contact list maintenance. Based on XML (Ext ...
. Common devices targeted are
Internet of things devices, routers and modems.
The
SANS Institute recommends that the use of Telnet for remote logins should be discontinued under normal circumstances for the following reasons:
* Telnet, by default, does not
encrypt
In cryptography, encryption (more specifically, encoding) is the process of transforming information in a way that, ideally, only authorized parties can decode. This process converts the original representation of the information, known as plai ...
any data sent over the connection (including passwords), and so it is often feasible to eavesdrop on the communications and use the password later for malicious purposes; anybody who has access to a
router,
switch
In electrical engineering, a switch is an electrical component that can disconnect or connect the conducting path in an electrical circuit, interrupting the electric current or diverting it from one conductor to another. The most common type o ...
,
hub or
gateway located on the network between the two hosts where Telnet is being used can intercept the packets passing by and obtain login, password and whatever else is typed with a
packet analyzer.
* Most Telnet implementations lack authentication. An estimated 22,887 Telnet-enabled devices found by security researchers not only lacked authentication but also provided
unrestricted access to the system.
* Most Telnet authentication mechanisms are vulnerable to being intercepted by
Man-in-the-middle attacks.
Extensions to Telnet provide
Transport Layer Security
Transport Layer Security (TLS) is a cryptographic protocol designed to provide communications security over a computer network, such as the Internet. The protocol is widely used in applications such as email, instant messaging, and voice over ...
(TLS) security and
Simple Authentication and Security Layer (SASL) authentication that address the above concerns.
However, most Telnet implementations do not support these extensions; and they do not address other vulnerabilities such as parsing the banner information.
Telnet over
VPN is a viable option if SSHv2 is not supported, or a VPN is already used to securely tunnel other application data to the remote network the Telnet server is present in. However, precautions must be taken: ideally the VPN should terminate on the Telnet server itself, unless the
LAN has additional security measures against eavesdropping and modification by other devices such as additional encryption and/or
VLANs. This is because Telnet traffic leaves the VPN server in its insecure plaintext form after it is decrypted. The VPN software should be a trusted one that is heavily audited (e.g.
OpenVPN,
WireGuard,
IPsec), using preferably certificate-based/public key
mutual authentication.
IBM 5250 or 3270 workstation emulation is supported via custom telnet clients,
TN5250/
TN3270, and
IBM i
IBM i (the ''i'' standing for ''integrated'') is an operating system developed by IBM for IBM Power Systems. It was originally released in 1988 as OS/400, as the sole operating system of the IBM AS/400 line of systems. It was renamed to i5/OS in 2 ...
systems. Clients and servers designed to pass
IBM 5250 data streams over Telnet generally do support
SSL encryption, as SSH does not include 5250 emulation. Under
IBM i
IBM i (the ''i'' standing for ''integrated'') is an operating system developed by IBM for IBM Power Systems. It was originally released in 1988 as OS/400, as the sole operating system of the IBM AS/400 line of systems. It was renamed to i5/OS in 2 ...
(also known as OS/400), port 992 is the default port for TelnetS (Telnet over SSL/TLS).
Uses
Historical uses
Historically, Telnet provided access to a
command-line interface
A command-line interface (CLI) is a means of interacting with software via command (computing), commands each formatted as a line of text. Command-line interfaces emerged in the mid-1960s, on computer terminals, as an interactive and more user ...
on a remote host. However, because of serious security concerns when using Telnet over an open network such as the Internet, its use for this purpose has waned significantly in favor of
SSH. The usage of Telnet for remote management has declined rapidly, especially on the public
Internet
The Internet (or internet) is the Global network, global system of interconnected computer networks that uses the Internet protocol suite (TCP/IP) to communicate between networks and devices. It is a internetworking, network of networks ...
, in favor of the
Secure Shell
The Secure Shell Protocol (SSH Protocol) is a cryptographic network protocol for operating network services securely over an unsecured network. Its most notable applications are remote login and command-line execution.
SSH was designed for ...
(SSH) protocol.
SSH provides much of the functionality of telnet, with the addition of strong encryption to prevent sensitive data such as passwords from being intercepted, and
public key authentication, to ensure that the remote computer is actually who it claims to be.
Modern day uses
The Telnet protocol is mainly used for legacy equipment that does not support more modern communication mechanisms. For example, a large number of industrial and scientific devices only have Telnet available as a communication option. Some are built with only a standard
RS-232 port and use a serial server hardware appliance to provide the translation between the TCP/Telnet data and the RS-232 serial data. In such cases, SSH is not an option unless the interface appliance can be configured for SSH (or is replaced with one supporting SSH).
Telnet is commonly used by
amateur radio
Amateur radio, also known as ham radio, is the use of the radio frequency radio spectrum, spectrum for purposes of non-commercial exchange of messages, wireless experimentation, self-training, private recreation, radiosport, contesting, and emer ...
operators for providing public information.
Despite recommendations against it, security researchers estimated that 7,096,465 exposed systems on the Internet continue to use Telnet as of 2021. However, estimates of this number have varied significantly, depending on the number of ports scanned beyond the default TCP port 23.
The Telnet client may be used in
debug
In engineering, debugging is the process of finding the root cause, workarounds, and possible fixes for bugs.
For software, debugging tactics can involve interactive debugging, control flow analysis, log file analysis, monitoring at the ap ...
ging network services such as
SMTP
The Simple Mail Transfer Protocol (SMTP) is an Internet standard communication protocol for electronic mail transmission. Mail servers and other message transfer agents use SMTP to send and receive mail messages. User-level email clients typi ...
,
IRC
IRC (Internet Relay Chat) is a text-based chat system for instant messaging. IRC is designed for group communication in discussion forums, called '' channels'', but also allows one-on-one communication via private messages as well as chat ...
, or
HTTP
HTTP (Hypertext Transfer Protocol) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web, wher ...
servers, to issue commands to the server and examine the responses. In this case, when the Telnet client establishes a TCP connection to a port other than the standard Telnet server port, it does not use the Telnet protocol, and can be used instead to send and receive data over the TCP connection directly.
Technical details
The technical details of Telnet are defined by a variety of specifications including .
USASCII control codes
Telnet commands
Telnet commands consist of at least two bytes.
The first byte is the IAC escape character (typically byte 255) followed by the byte code for a given command:
Interpret As Command
All data
octets
Octet may refer to:
Music
* Octet (music), ensemble consisting of eight instruments or voices, or composition written for such an ensemble
** String octet, a piece of music written for eight string instruments
*** Octet (Mendelssohn), 1825 compos ...
except 0xff are transmitted over Telnet as is.
(0xff, or 255 in decimal, is the IAC byte (Interpret As Command) which signals that the next byte is a telnet command. The command to insert 0xff into the stream is 0xff, so 0xff must be escaped by doubling it when sending data over the telnet protocol.)
Telnet options
Telnet also has a variety of options that terminals implementing Telnet should support.
Telnet clients
*
AbsoluteTelnet is a telnet client for
Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
. It also supports
SSH and
SFTP.
*
Inetutils includes a telnet client and server and is installed by default on many Linux distributions.
*
Line Mode Browser, a command line
web browser
A web browser, often shortened to browser, is an application for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's scr ...
*
NCSA Telnet
*
PuTTY
PuTTY () is a free and open-source terminal emulator, serial console and network file transfer application. It supports several network protocols, including SCP, SSH, Telnet, rlogin, and raw socket connection. It can also connect to a se ...
and plink command line are a free, open-source
SSH, Telnet,
rlogin, and
raw TCP client for
Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
,
Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
, and
Unix
Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
.
*
Rtelnet is a
SOCKS
A sock is a piece of clothing worn on the feet and often covering the ankle or some part of the Calf (leg), calf. Some types of shoes or boots are typically worn over socks. In ancient times, socks were made from leather or matted animal hair. ...
client version of Telnet, providing similar functionality of telnet to those hosts which are behind
firewall and
NAT.
*
RUMBA (Terminal Emulator)
*
SecureCRT from Van Dyke Software
*
SyncTERM is a BBS terminal program supporting Telnet, SSHv2, RLogin, Serial, Windows, *nix, and Mac OS X platforms, X/Y/ZMODEM and various BBS terminal emulations
* telnet.exe command line utility included in default installation of many versions of Microsoft Windows.
*
TeraTerm
*
ZOC Terminal
In popular culture
''
Star Wars: Episode IV – A New Hope'' from 1977 has been recreated as a
text art movie served through Telnet.
See also
*
Banner grabbing
*
HyTelnet
*
Kermit
*
List of terminal emulators
This is a list of notable terminal emulators. Most used terminal emulators on Linux and Unix-like systems are GNOME Terminal on GNOME and GTK-based environments, Konsole on KDE, and xfce4-terminal on Xfce as well as xterm.
List
See also
* We ...
*
Reverse telnet
*
SSH
*
Virtual terminal
In Open system (computing), open systems, a virtual terminal (VT) is an application service that:
# Allows Server (computing), host terminals on a multi-User (computing), user computer network, network to interact with other hosts regardless of ...
References
Further reading
Internet Standards
* , Telnet Protocol Specification
* , Telnet Option Specifications
* , Telnet Binary Transmission
* , Telnet Echo Option
* , Telnet Suppress Go Ahead Option
* , Telnet Status Option
* , Telnet Timing Mark Option
* , Telnet Extended Options: List Option
Proposed Standards
* , Telnet End of Record Option
* , Telnet Window Size Option
* , Telnet Terminal Speed Option
* , Telnet Terminal-Type Option
* , Telnet X Display Location Option
* , Requirements for Internet Hosts - Application and Support
* , Telnet Linemode Option
* , Telnet Remote Flow Control Option
* , Telnet Environment Option
* , Telnet Authentication Option
* , Telnet Authentication: Kerberos Version 5
* , TELNET Authentication Using DSA
* , Telnet Authentication: SRP
* , Telnet Data Encryption Option
* , The telnet URI Scheme
Informational/experimental
* , The Q Method of Implementing TELNET Option Negotiation
* , Telnet Environment Option Interoperability Issues
* , TELNET CHARSET Option
Other RFCs
* , TELNET RANDOMLY-LOSE Option (
April Fool's Day RFC joke)
* , Telnet 3270 Regime Option
* , TELNET SUBLIMINAL-MESSAGE Option (
April Fool's Day RFC joke)
* , 5250 Telnet Interface
* , TN3270 Enhancements
* , Telnet Com Port Control Option
* , IBM's iSeries Telnet Enhancements
External links
Telnet Options��The official list of assigned option numbers at iana.org
Telnet Interactions Described as a Sequence DiagramMicrosoft TechNet:Telnet commandsTELNET: The Mother of All (Application) Protocols* Contains a list of telnet addresses and list of telnet clients
{{URI scheme
Application layer protocols
History of the Internet
Internet Protocol based network software
Internet protocols
Internet Standards
Unix network-related software
URI schemes