Reverse telnet

Reverse telnet is a specialized application of telnet, where the server side of the connection reads and writes data to a TTY line (RS-232 serial port), rather than providing a command shell to the host device. Typically, reverse telnet is implemented on an embedded device (e.g. terminal/console server), which has an Ethernet network interface and serial port(s). Through the use of reverse telnet on such a device, IP-networked users can use telnet to access serially-connected devices.

In the past, reverse telnet was typically used to connect to modems or other external asynchronous devices. Today, reverse telnet is used mostly for connecting to the console port of a router, switch or other device.

Example

On the client, the command line for initiating a "reverse telnet" connection might look like this:

telnet 172.16.1.254 2002

(The syntax in the above example would be valid for the command-line telnet client packaged with many operating systems, including most Unices, or available as an option or add-on.)

In this example, 172.16.1.254 is the IP address of the server, and 2002 is the TCP port associated with a TTY line on the server.

A typical server configuration on a Cisco router would look like this:

version 12.3
service timestamps debug uptim
service timestamps log uptime
no service password-encryption
!
hostname Terminal_Server
!
ip host Router1 2101 8.8.8.8
ip host Router2 2102 8.8.8.8
ip host Router3 2113 8.8.8.8
!
!
interface Loopback0
description Used for Terminal Service
ip address 8.8.8.8 255.255.255.255
!
line con 0
exec-timeout 0 0
password MyPassword
login
line 97 128
transport input telnet
line vty 0 4
exec-timeout 0 0
password MyPassword
login
transport input none
!
end

Telnet - Current status

As of the mid-2000s, while the Telnet protocol itself has been mostly superseded for remote login, Telnet clients are still used, often when diagnosing problems, to manually "talk" to other services without specialized client software. For example, it is sometimes used in debugging network services such as an SMTP, IRC, HTTP, FTP or POP3 server, by serving as a simple way to send commands to the server and examine the responses.



This approach has limitations as Telnet clients speak is close to, but not equivalent to, raw mode (due to terminal control handshaking and the special rules regarding \377 and \15). Thus, other software such as nc (netcat) or socat on Unix (or PuTTY on Windows) are finding greater favor with some system administrators for testing purposes, as they can be called with arguments not to send any terminal control handshaking data. Also netcat does not distort the \377 octet, which allows raw access to TCP socket, unlike any standard-compliant Telnet software.



Telnet is popular with:

* enterprise networks to access host applications, e.g. on IBM Mainframes.
* administration of network elements, e.g., in commissioning, integration and maintenance of core network elements in mobile communication networks.
* MUD games played over the Internet, as well as talkers, MUSHes, MUCKs, MOOes, and the resurgent BBS community.
* embedded systems