telnet(1) telnet(1)
NAME
telnet - user interface to the TELNET protocol
SYNOPSIS
telnet[ -8][ hostname[ port]]
DESCRIPTION
Like rlogin, telnet starts a session at a remote host. However, unlike
rlogin, it uses a protocol which has been standardized by DARPA. This
makes it possible to start sessions on remote hosts where no Reliant
UNIX or UNIX operating system is installed.
telnet communicates with another host using the TELNET protocol. The
telnet server process must be active on the remote host.
To open a telnet session, you will need a login name and the associ-
ated password.
Since telnet is a line-oriented protocol for use with virtual termi-
nals, a full-screen emulation may be additionally required on some
non-Siemens Nixdorf computers for screen-oriented processing.
OPTIONS
-8 All characters passed between the remote host and the local ter-
minal are transmitted in 8-bit mode.
-8 not specified:
The default is the bit mode (possibly seven-bit) of the originat-
ing terminal.
hostname
Name of the host to which a connection is to be opened. Once a
connection to this host is open, telnet enters input mode.
This initiates a session at the specified host.
If no host is specified, telnet enters command mode.
port Port number of the port to be used.
port not specified:
The default port is used.
If the remote host is a Reliant UNIX or UNIX system, the remote login
program will expect you to enter the desired login name and the asso-
ciated password. If both are entered correctly, telnet enters input
mode.
A telnet session is terminated with the command close or quit. telnet
then exits to the command interpreter (shell).
Page 1 Reliant UNIX 5.44 Printed 11/98
telnet(1) telnet(1)
PROCESSING MODES
telnet has two processing modes: command mode and input mode.
Command mode
If you call telnet without arguments, it automatically enters command
mode. The input prompt is telnet>. In this mode telnet accepts and
executes the commands listed below.
If you call telnet with arguments, it will perform an open command to
establish a connection in accordance with these arguments. You will
then be working in input mode.
The set of commands available at a host is governed by the specific
implementation of the telnet protocol. The implemented commands can be
checked with the ? command.
Input mode
Once a connection to a remote host has been established, telnet enters
input mode. Your terminal then reacts as if it were directly connected
to the remote host. If you want to work on the remote host, you will
need to know the system installed there.
In input mode data is transmitted either one character at a time or
line by line, depending on which transmission mode is supported by the
remote host.
In character-at-a-time mode, each character you enter is immediately
sent to the remote host for processing.
In line-by-line mode, all text is echoed locally, and (normally) only
completed lines are sent to the remote host. The local echo character
(CTRL-E by default) may be used to turn the local echo on and off.
This option would be used, for example, to enter passwords without the
password being echoed.
If the localchars toggle is turned on, the user's quit, intr, and
flush characters are trapped locally and sent as telnet protocol
sequences to the remote site. This is the default in line mode. The
toggle autoflush and toggle autosynch options can be used to ensure
that the I/O buffers for the terminal are flushed following these
actions.
To issue telnet commands in input mode, you first have to type the
telnet escape character CTRL-]. If telnet is in command mode, you can
use the normal input conventions.
Caution:
Do not attempt to run layers while using telnet.
telnet has no adequate way for dealing with flow control.
Page 2 Reliant UNIX 5.44 Printed 11/98
telnet(1) telnet(1)
TELNET COMMANDS
The commands described below are available in command mode. To issue
these commands, you only need to enter as many characters as are
required to identify the command uniquely.
The set of commands available at a host is governed by the specific
implementation of the telnet protocol. The implemented commands can be
checked with the ? command.
Functional overview of commands
The following section provides a brief overview of telnet commands,
classified into function groups.
______________________________________________________________________
Opening and closing a connection
open open a connection to a remote host
close close all open connections
quit close all open connections and exit telnet
______________________________________________________________________
TELNET control
mode switch between character-at-a-time and line-by-line
transmission
send transmit special character sequences to the remote host
set modify telnet variables or disable associated functions
toggle turn various functions on or off
z suspend telnet
______________________________________________________________________
Information about TELNET
? get information on telnet commands
status show telnet status information
display show some or all parameter settings
______________________________________________________________________
Page 3 Reliant UNIX 5.44 Printed 11/98
telnet(1) telnet(1)
Alphabetical overview of commands
This section contains an alphabetical overview of all telnet commands.
close
Closes a telnet session and returns to the command interpreter
(shell).
display[ argument...]
Displays the set and toggle values of the specified arguments.
No argument specified:
All set and toggle values are displayed.
mode type
Toggles between line-by-line and character-at-a-time transmis-
sion. type can be either line or character. The remote host is
asked for permission to go into the requested mode. If the remote
host is capable of entering that mode, the requested mode will be
entered.
open host [port]
Opens a connection to the named host and switches to input mode.
host is the name or Internet address of the host to which a con-
nection is to be opened.
telnet does not check whether the host name has been entered
in the /etc/hosts file or in the Network Information Service
(NIS) file hosts.
If the named host is not entered in these files, it must be
addressed via its Internet address.
port is the number of the port through which the connection is to
be established.
Port number not specified:
telnet attempts to contact a telnet server at the default
port (TCP-23).
quit Closes a telnet session and returns to the command interpreter.
An EOF character in command mode has the same effect as quit.
However, the EOF character is only recognized and transmitted to
the remote host if it appears at the beginning of a line.
Page 4 Reliant UNIX 5.44 Printed 11/98
telnet(1) telnet(1)
send argument...
Sends one or more special character sequences to the remote host.
One or more of the following arguments may be specified:
escape
Sends the current telnet escape character (default: CTRL-]).
synch
Sends the telnet SYNCH sequence. This sequence discards
input that has already been typed but not yet read on the
remote host.
The sequence is sent as TCP urgent data (and may not work if
the remote host is a 4.2 BSD system). If it does not work,
the character r may be echoed on the display terminal.
brk Sends the telnet BRK sequence (Break), which may have signi-
ficance to the remote host.
ip Sends the telnet IP sequence (Interrupt Process), which
aborts the currently running process on the remote host.
ao Sends the telnet AO sequence (Abort Output), which flushes
all output from the buffers of the remote host to the user's
terminal.
ayt Sends the telnet AYT sequence (Are You There), to which the
remote host may or may not choose to respond.
ec Sends the telnet EC sequence (Erase Character), which erases
the last character entered.
el Sends the telnet EL sequence (Erase Line), which instructs
the remote host to erase the last line entered.
ga Sends the telnet GA sequence (Go Ahead), which may well have
no significance to the remote host.
nop Sends the telnet NOP sequence (No Operation).
? Prints out help information for the send command.
set argument value
Sets a telnet variable to a specific value. The special value off
turns off the function associated with the variable. The values
of variables may be interrogated with the display command. The
arguments (variables) you can specify are:
echo Toggles echoing on the local host in line-by-line mode (for
example, so that the entry of a password is not shown on the
terminal). On some remote hosts, echoing has to be turned
off manually in line-by-line mode.
Page 5 Reliant UNIX 5.44 Printed 11/98
telnet(1) telnet(1)
Default value:
The default echo character is CTRL-E.
escape
This is the telnet escape character. Typing CTRL and the
defined escape character causes telnet to switch from input
mode to command mode in an open telnet session.
Any printable character may be used as the escape character.
Default value:
The default escape character is CTRL-].
interrupt
If telnet is in localchars mode (see toggle localchars) and
you type the interrupt character, the telnet IP sequence
(see send ip) is sent to the remote host.
Default value:
The default interrupt character is the intr character of
your terminal [see stty(1)].
quit If telnet is in localchars mode (see toggle localchars) and
you type the quit character, the telnet BRK sequence (see
send brk) is sent to the remote host.
Default value:
The default quit character is the quit character of your
terminal [see stty(1)].
flushoutput
If telnet is in localchars mode (see toggle localchars) and
you type the flushoutput character, the telnet AO sequence
(see send ao) is sent to the remote host.
Default value:
The default flushoutput character is the flush character of
your terminal [see stty(1)].
erase
If you type the erase character when telnet is in localchars
mode (see toggle localchars) and in character-at-a-time
mode, the telnet EC sequence (see send ec) is sent to the
remote host.
Page 6 Reliant UNIX 5.44 Printed 11/98
telnet(1) telnet(1)
Default value:
The default erase character is the erase character of your
terminal [see stty(1)].
kill If you type the kill character when telnet is in localchars
mode (see toggle localchars) and in character-at-a-time
mode, the telnet EL sequence (see send el) is sent to the
remote host.
Default value:
The default kill character is the kill character of your
terminal [see stty(1)].
eof If telnet is operating in line-by-line mode, entering this
character as the first character on a line immediately sends
this character to the remote host.
Default value:
The default eof character is the eof character of your ter-
minal [see stty(1)].
status
Shows the current status of telnet.
This command shows the host to which a connection exists, if any,
and the current escape character.
toggle argument...
Toggles (between TRUE and FALSE) various flags that control how
telnet responds to different events. Each flag (argument) stands
for a function that is either turned on (TRUE) or turned off
(FALSE) in order to change its state. Current states can be
interrogated with the display command. One or more of the follow-
ing arguments may be specified:
autoflush
If autoflush and localchars are both TRUE and the ao, intr,
or quit characters are recognized (and transformed into tel-
net sequences, see set), then no data will be displayed on
the terminal until the remote host acknowledges that it has
processed those sequences.
Default value:
The default value for autoflush is TRUE if the terminal user
has not used stty noflsh; otherwise, FALSE.
Page 7 Reliant UNIX 5.44 Printed 11/98
telnet(1) telnet(1)
autosynch
If autosynch and localchars are both TRUE, then when either
the intr or quit characters are typed (see set), the result-
ing telnet sequence sent is followed by the telnet SYNCH
sequence. This should cause the remote host to erase all
previous input until both telnet sequences have been read
and processed.
Default value:
The default value for autosynch is FALSE.
crmod
Causes the remote host to insert a carriage return at the
end of each line during transmission.
Normally no carriage returns are inserted.
crmod toggles this function on and off.
Caution:
Line feeds will be duplicated if the remote host
automatically sends carriage returns (e.g. as Reliant
UNIX does) and the crmod function is enabled.
Default value:
The default value for crmod is FALSE.
debug
Toggles support for socket level debugging. This is only
useful for the system administrator.
Default value:
The default value for debug is FALSE.
localchars
If localchars is TRUE, the flush, interrupt, quit, erase,
and kill characters (see set) are recognized locally and
transformed into the appropriate telnet control sequences,
i.e. ao, ip, brk, ec and el (see send).
Default value:
The default value for localchars is TRUE in line-by-line
mode, and FALSE in character-at-a-time mode.
netdata
Toggles the display of all network data. The display appears
in hexadecimal format.
Page 8 Reliant UNIX 5.44 Printed 11/98
telnet(1) telnet(1)
Default value:
The default value for netdata is FALSE.
options
Toggles the display of the telnet options being processed.
telnet options are normally exchanged with the server during
connection setup.
If this mode is enabled, all declared options are displayed.
Options sent by telnet are shown as SENT, while those
received by telnet are shown as RCVD.
Default value:
The default value for options is FALSE.
? Displays all legal arguments for the toggle command.
z Suspends telnet. This command will only work if you are using a
shell that supports job control (such as sh).
?[ command]
Gets help for the specified command. If you enter a ? without
arguments, telnet will print a help summary of all implemented
telnet commands. If a command is specified, telnet will print the
help information for just that command.
EXAMPLES
To get help on the implemented telnet commands:
$ telnet
telnet>?
Commands may be abbreviated. Commands are:
close close current connection
display display operating parameters
mode try to enter line-by-line or character-at-a-time mode
open connect to a site
quit exit telnet
send transmit special characters ('send ?' for more)
set set operating parameters ('set ?' for more)
status print status information
toggle toggle operating parameters ('toggle ?' for more)
z suspend telnet
! fork subshell
? print help information
Page 9 Reliant UNIX 5.44 Printed 11/98
telnet(1) telnet(1)
To open a connection with host jjoyce:
telnet>open jjoyce
Trying ...
Connected to jjoyce
Escape character is '^]'
UNIX (r) System V Release 4.0 (jjoyce)
.
.
login: Finnegan
Password: blanked input of the password
SEE ALSO
rlogin(1), sh(1), stty(1).
Page 10 Reliant UNIX 5.44 Printed 11/98