LinuxCommandLibrary

telnet

Connect to remote systems using Telnet protocol

TLDR

Telnet to the default port of a host

$ telnet [host]
copy

Telnet to a specific port of a host
$ telnet [ip_address] [port]
copy

Exit a telnet session
$ quit
copy

Emit the default escape character combination for terminating the session
$ <Ctrl ]>
copy

Start telnet with "x" as the session termination character
$ telnet [[-e|--escape]] [x] [ip_address] [port]
copy

Telnet to Star Wars animation
$ telnet [towel.blinkenlights.nl]
copy

SYNOPSIS

telnet [hostname|IP address] [port]

PARAMETERS

hostname|IP address
    The hostname or IP address of the remote machine to connect to.

port
    The port number to connect to on the remote host (default is 23).

DESCRIPTION

Telnet is a user command and underlying TCP/IP protocol for accessing remote computers. Through telnet, an administrator or another user can access someone else's computer remotely. Telnet is a client-server protocol, where the telnet client runs on your machine and connects to a telnet server running on a remote system.

It allows you to establish a terminal session on another host. However, it transmits data in plaintext, making it inherently insecure, particularly for password exchange. Therefore, its use is generally discouraged, especially over untrusted networks like the internet. Alternatives like SSH are widely preferred due to their encryption capabilities.

CAVEATS

Telnet transmits data in plaintext, making it extremely vulnerable to eavesdropping. Do not use Telnet over public networks. Use SSH instead.

SECURITY CONSIDERATIONS

The most significant drawback of Telnet is its lack of encryption. All data, including usernames and passwords, are transmitted in clear text. This makes it easy for attackers to intercept sensitive information using packet sniffing tools. Because of this vulnerability, Telnet should not be used unless absolutely necessary and only over trusted networks.

COMMON USAGE (HISTORICAL)

Historically, Telnet was used for a variety of tasks, including:
Remote system administration: Connecting to servers to configure settings or troubleshoot issues.
Accessing online resources: Connecting to public terminals or BBS systems.
Testing network services: Checking if a service is listening on a specific port. This has largely been replaced by tools like `netcat`.

HISTORY

Telnet was one of the earliest internet protocols and was widely used for remote access and administration. However, due to its lack of security, its usage has declined significantly with the rise of secure alternatives like SSH. Telnet was standardized in 1969 by the IETF and updated through various RFCs. Today it's rarely enabled by default. The rise of SSH has marked the decline of Telnet.

SEE ALSO

ssh(1), netcat(1)

Copied to clipboard