Telnet offers users the capability of running programs remotely and
facilitates remote administration. Telnet is available for practically all
operating systems and eases integration in heterogeneous networking
environments.
Telnet 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.
It should be emphasized that the Telnet server can pass on the data it has
received from the client to many other types of processes including a remote
logon server. This is described in RFC854 and was first published in 1983.
The Network Virtual Terminal
Communication is established using TCP/IP and is based on a Network Virtual
Terminal (NVT). On the client, the Telnet program is responsible for
translating incoming NVT codes to codes understood by the client's display
device as well as for translating client-generated keyboard codes into
outgoing NVT codes.
The NVT uses 7-bit codes for characters. The display device, referred to as
a printer in the RFC, is only required to display the standard printing
ASCII characters represented by 7-bit codes and to recognize and process
certain control codes. The 7-bit characters are transmitted as 8-bit bytes
with the most significant bit set to zero. An end-of-line is transmitted as
a carriage return (CR) followed by a line feed (LF). If you want to transmit
an actual carriage return, this is transmitted as a carriage return followed
by a NUL (all bits zero) character.
NVT ASCII is used by many other Internet protocols like SMTP and FTP.
The following control codes are required to be understood by the NVT.
Name |
Code |
Decimal Value |
Function |
NULL |
NUL |
0 |
No operation |
Line Feed |
LF |
10 |
Moves the printer to the next print line, keeping the same
horizontal position. |
Carriage Return |
CR |
13 |
Moves the printer to the left margin of the current line. |
The following further control codes are optional but should have the
indicated defined effect on the display.
Name |
Code |
Decimal Value |
Function |
BELL |
BEL |
7 |
Produces an audible or visible signal (which does NOT move the
print head. |
Back Space |
BS |
8 |
Moves the print head one character position towards the left
margin. (On a printing device, this mechanism was commonly used to
form composite characters by printing two basic characters on top of
each other.) |
Horizontal Tab |
HT |
9 |
Moves the printer to the next horizontal tab stop. It remains
unspecified how either party determines or establishes where such
tab stops are located. |
Vertical Tab |
VT |
11 |
Moves the printer to the next vertical tab stop. It remains
unspecified how either party determines or establishes where such
tab stops are located. |
Form Feed |
FF |
12 |
Moves the printer to the top of the next page, keeping the same
horizontal position. (On visual displays, this commonly clears the
screen and moves the cursor to the top left corner.) |
The NVT keyboard is specified as being capable of generating all 128 ASCII
codes by using keys, key combinations, or key sequences.