.\" Copyright (c) 1983, 1990 The Regents of the University of California.
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" @(#)telnet.1 6.16 (Berkeley) 7/27/91
.Nd User interface to the
is used to communicate with another host using the
argument, it enters command mode,
In this mode, it accepts and executes the commands listed below.
If it is invoked with arguments, it performs an
command with those arguments.
Sets the initial value of the
Currently, this sends the user name via the
option if supported by the remote system.
The name used is that of the current user as returned by
if it agrees with the current user ID,
otherwise it is the name associated with the user ID.
for recording trace information.
When connecting to the remote system, if the remote system
will be sent to the remote system as the value for the variable USER.
This option may also be used with the
there will be no escape character.
Indicates the official name, an alias, or the Internet address
Indicates a port number (address of an application). If a number is
not specified, the default
Once a connection has been opened,
will attempt to enable the
will revert to one of two input modes:
either \*(Lqcharacter at a time\*(Rq
or \*(Lqold line by line\*(Rq
depending on what the remote system supports.
is enabled, character processing is done on the
local system, under the control of the remote system. When input
editing or character echoing is to be disabled, the remote system
will relay that information. The remote system will also relay
changes to any special characters that happen on the remote
system, so that they can take effect on the local system.
In \*(Lqcharacter at a time\*(Rq mode, most
text typed is immediately sent to the remote host for processing.
In \*(Lqold line by line\*(Rq mode, all text is echoed locally,
and (normally) only completed lines are sent to the remote host.
The \*(Lqlocal echo character\*(Rq (initially \*(Lq^E\*(Rq) may be used
to turn off and on the local echo
(this would mostly be used to enter passwords
without the password being echoed).
option is enabled, or if the
(the default for \*(Lqold line by line\*(Lq; see below),
characters are trapped locally, and sent as
protocol sequences to the remote side.
has ever been enabled, then the user's
which cause this action to flush subsequent output to the terminal
(until the remote host acknowledges the
sequence) and flush previous terminal input
While connected to a remote host,
command mode may be entered by typing the
\*(Lqescape character\*(Rq (initially \*(Lq^]\*(Rq).
When in command mode, the normal terminal editing conventions are available.
Only enough of each command to uniquely identify it need be typed
(this is also true for arguments to the
.Bl -tag -width "mode type"
session and return to command mode.
.It Ic display Ar argument ...
Displays all, or some, of the
is one of several options, depending on the state of the
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
option, or, if the remote side does not understand the
option, then enter \*(Lqcharacter at a time\*(Lq mode.
option, or, if the remote side does not understand the
option, then attempt to enter \*(Lqold-line-by-line\*(Lq mode.
Attempt to enable (disable) the
Attempt to enable (disable) the
.It Ic softtabs Pq Ic \-softtabs
Attempt to enable (disable) the
.It Ic litecho Pq Ic \-litecho
Attempt to enable (disable) the
Prints out help information for the
Open a connection to the named host.
will attempt to contact a
server at the default port.
The host specification may be either a host name (see
or an Internet address specified in the \*(Lqdot notation\*(Rq (see
option may be used to specify the user name
to be passed to the remote system via the
When connecting to a non-standard port,
omits any automatic initiation of
options. When the port number is preceeded by a minus sign,
the inital option negotiation is done.
After establishing a connection, the file
users home directory is opened. Lines begining with a # are
comment lines. Blank lines are ignored. Lines that begin
without whitespace are the start of a machine entry. The
first thing on the line is the name of the machine that is
being connected to. The rest of the line, and successive
lines that begin with whitespace are assumed to be
commands and are processed as if they had been typed
An end of file (in command mode) will also close a session and exit.
Sends one or more special character sequences to the remote host.
The following are the arguments which may be specified
(more than one argument may be specified at a time):
(Abort Output) sequence, which should cause the remote system to flush
sequence, to which the remote system may or may not choose to respond.
(Break) sequence, which may have significance to the remote
sequence, which should cause the remote system to erase the last character
sequence, which should cause the remote system to erase the line currently
escape character (initially \*(Lq^\*(Rq).
sequence, which likely has no significance to the remote system.
If the remote side supports the
will send the subnegotiation to request that the server send
its current option status.
(Interrupt Process) sequence, which should cause the remote
system to abort the currently running process.
This sequence causes the remote system to discard all previously typed
(but not yet read) input.
data (and may not work if the remote system is a
it doesn't work, a lower case \*(Lqr\*(Rq may be echoed on the terminal).
Prints out help information for the
.It Ic set Ar argument value
.It Ic unset Ar argument value
command will set any one of a number of
variables to a specific value or to
turns off the function associated with
the variable, this is equivalent to using the
command will disable or set to
any of the specified functions.
The values of variables may be interrogated with the
The variables which may be set or unset, but not toggled, are
listed here. In addition, any of the variables for the
command may be explicitly set or unset using
This is the value (initially \*(Lq^E\*(Rq) which, when in
\*(Lqline by line\*(Rq mode, toggles between doing local echoing
of entered characters (for normal processing), and suppressing
echoing of entered characters (for entering, say, a password).
or \*(Lqold line by line\*(Rq mode, entering this character
as the first character on a line will cause this character to be
sent to the remote system.
The initial value of the eof character is taken to be the terminal's
is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
is sent to the remote system.
The initial value for the erase character is taken to be
escape character (initially \*(Lq^[\*(Rq) which causes entry
command mode (when connected to a remote system).
is sent to the remote host.
The initial value for the flush character is taken to be
is sent to the remote host.
The initial value for the interrupt character is taken to be
is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
is sent to the remote system.
The initial value for the kill character is taken to be
or \*(Lqold line by line\*(Lq mode, then this character is taken to
The initial value for the lnext character is taken to be
is sent to the remote host.
The initial value for the quit character is taken to be
or \*(Lqold line by line\*(Lq mode, then this character is taken to
The initial value for the reprint character is taken to be
.Dv TELNET TOGGLE-FLOW-CONTROL
then this character is taken to
The initial value for the kill character is taken to be
.Dv TELNET TOGGLE-FLOW-CONTROL
then this character is taken to
The initial value for the kill character is taken to be
is sent to the remote host.
The initial value for the suspend character is taken to be
Thi is the file to which the output, caused by
will be written. If it is set to
then tracing information will be written to standard output (the default).
or \*(Lqold line by line\*(Lq mode, then this character is taken to
The initial value for the worderase character is taken to be
command (Set Local Characters) is used to set
or change the state of the the special
been enabled. Special characters are characters that get
or line editing characters (like
By default, the local special characters are exported.
Switch to the local defaults for the special characters. The
local default characters are those of the local terminal at
Switch to the remote defaults for the special characters.
The remote default characters are those of the remote system
connection was established.
Verify the current settings for the current special characters.
The remote side is requested to send all the current special
character settings, and if there are any discrepencies with
the local side, the local side will switch to the remote value.
Prints out help information for the
.It Ic environ Ar arguments...
command is used to manipulate the
the variables that my be sent through the
The initial set of variables is taken from the users
environment, with only the
variables being exported by default.
variable is also exported if the
.It Ic define Ar variable value
Any variables defined by this command are automatically exported.
may be enclosed in single or double quotes so
that tabs and spaces may be included.
.It Ic undefine Ar variable
from the list of environment variables.
.It Ic export Ar variable
to be exported to the remote side.
.It Ic unexport Ar variable
to not be exported unless
explicitly asked for by the remote side.
List the current set of environment variables.
will be sent automatically,
other variables will only be sent if explicitly requested.
Prints out help information for the
.It Ic toggle Ar arguments ...
various flags that control how
These flags may be set explicitly to
More than one argument may be specified.
The state of these flags may be interrogated with the
characters are recognized (and transformed into
refuses to display any data on the user's terminal
until the remote system acknowledges (via a
that it has processed those
The initial value for this toggle is
if the terminal user had not
done an "stty noflsh", otherwise
above for descriptions of the
characters), the resulting
sequence sent is followed by the
cause the remote system to begin throwing away all previously
typed input until both of the
sequences have been read and acted upon.
The initial value of this toggle is
option on both input and output.
then carriage returns will be sent as
then carriage returns will be send as
The initial value for this toggle is
Toggle carriage return mode.
When this mode is enabled, most carriage return characters received from
the remote host will be mapped into a carriage return followed by
This mode does not affect those characters typed by the user, only
those received from the remote host.
This mode is not very useful unless the remote host
only sends carriage return, but never line feed.
The initial value for this toggle is
Toggles socket level debugging (useful only to the
The initial value for this toggle is
above) are recognized locally, and transformed into (hopefully) appropriate
The initial value for this toggle is
in \*(Lqold line by line\*(Rq mode,
in \*(Lqcharacter at a time\*(Rq mode.
option is enabled, the value of
is ignored, and assumed to always be
has ever been enabled, then
Toggles the display of all network data (in hexadecimal format).
The initial value for this toggle is
Toggles the display of some internal
protocol processing (having to do with
The initial value for this toggle is
is enabled the output from the
command will be formated in a more user readable format.
Spaces are put between each character in the output, and the
escape sequence is preceeded by a '*' to aid in locating them.
This command only works when the user is using the
Execute a single command in a subshell on the local
is ommitted, then an interactive
Show the current status of
This includes the peer one is connected to, as well
Get help. With no arguments,
If a command is specified,
will print the help information for just that command.
Other envirnoment variables may be propogated
to the other side via the
.Bl -tag -width ~/.telnetrc -compact
user customized telnet startup values
On some remote systems, echo has to be turned off manually when in
\*(Lqold line by line\*(Rq mode.
In \*(Lqold line by line\*(Rq mode or
character is only recognized (and sent to the remote system)
when it is the first character on a line.