Table of Contents
What is Telnet?
In client/server computing, you need to be able to send data to and receive data
from a host. To do this, a general terminal or a
terminal emulator
is normally used. Naturally, the terminal or the PC that is running a terminal
emulator must be connected to the server or mainframe computer.
There are various different methods that can be used to connect the terminal to
the server. Among these methods are serial cables, modems and existing local area
and wide area networks.
For a long time, the most common network-based connection method was Telnet, a
standard protocol for making text-based connections between two different
computers.
Nevertheless, Telnet has one major drawback: all data is exchanged without
any form of encryption.
In a small corporate environment where LAN cables and infrastructure are controlled
by the owners, today Telnet may well be barely sufficient. However, it can present
a serious security risk when you are transmitting over a wide area or using public
lines.
When using Telnet, anybody with network knowledge and tools can monitor the data
exchange, even gaining access to details like usernames and
passwords. For this reason, nowadays SSH
(Secure Shell)
is usually a better alternative.
Telnet Technical Reference
The technical specifics for telnet that a telnet-client needs to
adhere to are defined in
RFC-854.
Its abstract describes Telnet like this:
A TELNET connection is
a Transmission Control Protocol (TCP) connection used to transmit
data with interspersed TELNET control
information. The TELNET Protocol is built upon three main ideas:
first, the concept of a "Network Virtual Terminal"; second, the
principle of negotiated options; and third, a symmetric view of
terminals and processes.
In other words, telnet defines a way for two computers (telnet-client
and telnet-server) to make a text based communication (usually typed
commands and text reply) over a network (TCP), but allowes to mix
internal telnet-client specific controls into the data that the user
sees.
Telnet Technical Implementation Basics
Telnet communication between client and server is established using the TCP/IP protocols and
communication is based on a set of facilities known as a Network Virtual Terminal
(NVT).
Essentially the telnet protocol is the network version of the earliest terminals which
where connected to the host using serial cables. So in a way telnet treats the network
connection between client and server as if it were a long serial connection.
Data is mostly considered to be printable ASCII text to be transmitted to and interpreted by
the other side. Data which the server sends, is dispayed on the client screen. Characters
typed on the client are sent to the server.
The client, usually playing the role of a terminal emulator
may interpret some incoming characters a screen control codes (e.g. to place the cursor or change
text color). In a way, a telnet client is a screen and keyboard hooked up to the server by
a very very long cable (i.e. the network).
Interpret-as-Command (IAC)
The telnet transmission is not fully transparent however. Telnet reserves the use of
one character with code hex FF for its own use and uses that to insert control data
into the user's data stream. This data is not intended to be displayed to the user,
but instead its purpose is to manage the connection.
The xFF character is called IAC or Interpret as Command
The client and server use this character to manage the connection or transmit data that
is not intended for the user, e.g. the telnet client can use it to tell the server about
changes in screen size, or that it intends to transmit binary data.
All Telnet commands consist of at least a two byte sequence: the
"Interpret as Command" (IAC) escape character followed by the code
for the command. The commands dealing with option negotiation are
three byte sequences, the third byte being the code for the option
referenced. This format was chosen so that as more comprehensive use
of the "data space" is made, collisions of data bytes with reserved
command values will be minimized. With the chosen set-up, only the
IAC need be doubled to be sent as data, and the other 255 codes
may be passed transparently.
Some of the telnet commands (2nd byte in the data stream after IAC) are:
- Abort Output (AO)
Allow the current process to (appear to) run to completion, but
do not send its output to the user. Also, send a Synch to the
user.
- Are You There (AYT)
Send back to the NVT some visible (i.e., printable) evidence
that the AYT was received.
- Erase Character (EC)
The recipient should delete the last preceding undeleted
character or "print position" from the data stream.
- Erase Line (EL)
The recipient should delete characters from the data stream
back to, but not including, the last "CR LF" sequence sent over
the TELNET connection.
Telnet Client equals Terminal Emulator
As outlined above,
telnet is a connection method that allows character based terminals to
communicate to a remote server in text-based command oriented
terminal sessions. Think of it as a way to type commands and see
results in a shell Window (e.g. in the black DOS/Command Prompt Window
on a Windows computer or the terminal window on a Linux computer), but
a shell Window that is not running commands on the local but on a
remote computer.
A telnet-client is a computer that the user interacts with, while the
telnet-server processes the commands. The telnet-client is usually
a terminal emulator,
i.e. a software that allows a remote computer to receive keyboard input
from, and send formatted text to the user's computer.
ZOC is the
telnet client that can handle all the basic terminal functions as
well as a wealth of additional, useful features. This telnet client takes
advantage of the computing power of a PC to allow you to automate tasks
(such as logging on or retrieving data automatically), log sessions on
screen or file (for documentation or later review), copy data between a
text processor and the remote server, and much more.