version 1.45, 2013/01/17 21:29:15 |
version 1.46, 2014/01/19 10:39:00 |
|
|
.Os |
.Os |
.Sh NAME |
.Sh NAME |
.Nm telnet |
.Nm telnet |
.Nd user interface to the |
.Nd user interface to the TELNET protocol |
.Tn TELNET |
|
protocol |
|
.Sh SYNOPSIS |
.Sh SYNOPSIS |
.Nm telnet |
.Nm telnet |
.Bk -words |
.Bk -words |
|
|
The |
The |
.Nm |
.Nm |
command |
command |
is used to communicate with another host using the |
is used to communicate with another host using the TELNET protocol. |
.Tn TELNET |
|
protocol. |
|
If |
If |
.Nm |
.Nm |
is invoked without the |
is invoked without the |
|
|
.Ic intr , |
.Ic intr , |
and |
and |
.Ic flush |
.Ic flush |
characters are trapped locally, and sent as |
characters are trapped locally, and sent as TELNET |
.Tn TELNET |
|
protocol sequences to the remote side. |
protocol sequences to the remote side. |
If |
If |
.Dv LINEMODE |
.Dv LINEMODE |
|
|
.Ic susp |
.Ic susp |
and |
and |
.Ic eof |
.Ic eof |
are also sent as |
are also sent as TELNET protocol sequences, and |
.Tn TELNET |
|
protocol sequences, |
|
and |
|
.Ic quit |
.Ic quit |
is sent as a |
is sent as a |
.Dv TELNET ABORT |
.Dv TELNET ABORT |
|
|
.Ic autosynch |
.Ic autosynch |
below) |
below) |
which cause this action to flush subsequent output to the terminal |
which cause this action to flush subsequent output to the terminal |
(until the remote host acknowledges the |
(until the remote host acknowledges the TELNET |
.Tn TELNET |
|
sequence) and flush previous terminal input |
sequence) and flush previous terminal input |
(in the case of |
(in the case of |
.Ic quit |
.Ic quit |
|
|
authentication. |
authentication. |
.El |
.El |
.It Ic close |
.It Ic close |
Close a |
Close a TELNET session and return to command mode. |
.Tn TELNET |
|
session and return to command mode. |
|
.It Ic display Ar argument ... |
.It Ic display Ar argument ... |
Displays all, or some, of the |
Displays all, or some, of the |
.Ic set |
.Ic set |
|
|
option, nothing happens. |
option, nothing happens. |
If, however, the remote side does support the |
If, however, the remote side does support the |
.Dv LOGOUT |
.Dv LOGOUT |
option, this command should cause the remote side to close the |
option, this command should cause the remote side to close the TELNET |
.Tn TELNET |
|
connection. |
connection. |
If the remote side also supports the concept of |
If the remote side also supports the concept of |
suspending a user's session for later reattachment, |
suspending a user's session for later reattachment, |
|
|
should terminate the session immediately. |
should terminate the session immediately. |
.It Ic mode Ar type |
.It Ic mode Ar type |
.Ar type |
.Ar type |
is one of several options, depending on the state of the |
is one of several options, depending on the state of the TELNET |
.Tn TELNET |
|
session. |
session. |
The remote host is asked for permission to go into the requested mode. |
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 |
If the remote host is capable of entering that mode, the requested |
|
|
If no port number |
If no port number |
is specified, |
is specified, |
.Nm |
.Nm |
will attempt to contact a |
will attempt to contact a TELNET server at the default port. |
.Tn TELNET |
|
server at the default port. |
|
The host specification may be either a host name (see |
The host specification may be either a host name (see |
.Xr hosts 5 ) |
.Xr hosts 5 ) |
or an Internet address specified in the ``dot notation'' (see |
or an Internet address specified in the ``dot notation'' (see |
|
|
option. |
option. |
When connecting to a non-standard port, |
When connecting to a non-standard port, |
.Nm |
.Nm |
omits any automatic initiation of |
omits any automatic initiation of TELNET options. |
.Tn TELNET |
|
options. |
|
When the port number is preceded by a minus sign, |
When the port number is preceded by a minus sign, |
the initial option negotiation is done. |
the initial option negotiation is done. |
After establishing a connection, the file |
After establishing a connection, the file |
|
|
.Nm |
.Nm |
command prompt. |
command prompt. |
.It Ic quit |
.It Ic quit |
Close any open |
Close any open TELNET session and exit |
.Tn TELNET |
|
session and exit |
|
.Nm telnet . |
.Nm telnet . |
An end-of-file (in command mode) will also close a session and exit. |
An end-of-file (in command mode) will also close a session and exit. |
.It Ic send Ar argument ... |
.It Ic send Ar argument ... |
|
|
sequence. |
sequence. |
This sequence causes the remote system to discard all previously typed |
This sequence causes the remote system to discard all previously typed |
(but not yet read) input. |
(but not yet read) input. |
This sequence is sent as |
This sequence is sent as TCP urgent |
.Tn TCP |
|
urgent |
|
data (and may not work if the remote system is a |
data (and may not work if the remote system is a |
.Bx 4.2 |
.Bx 4.2 |
system -- if |
system -- if |
|
|
sequence. |
sequence. |
.Ar cmd |
.Ar cmd |
can be either a decimal number between 0 and 255, |
can be either a decimal number between 0 and 255, |
or a symbolic name for a specific |
or a symbolic name for a specific TELNET command. |
.Dv TELNET |
|
command. |
|
.Ar cmd |
.Ar cmd |
can also be either |
can also be either |
.Ic help |
.Ic help |
|
|
sequence. |
sequence. |
.Ar cmd |
.Ar cmd |
can be either a decimal number between 0 and 255, |
can be either a decimal number between 0 and 255, |
or a symbolic name for a specific |
or a symbolic name for a specific TELNET command. |
.Dv TELNET |
|
command. |
|
.Ar cmd |
.Ar cmd |
can also be either |
can also be either |
.Ic help |
.Ic help |
|
|
sequence. |
sequence. |
.Ar cmd |
.Ar cmd |
can be either a decimal number between 0 and 255, |
can be either a decimal number between 0 and 255, |
or a symbolic name for a specific |
or a symbolic name for a specific TELNET command. |
.Dv TELNET |
|
command. |
|
.Ar cmd |
.Ar cmd |
can also be either |
can also be either |
.Ic help |
.Ic help |
|
|
sequence. |
sequence. |
.Ar cmd |
.Ar cmd |
can be either a decimal number between 0 and 255, |
can be either a decimal number between 0 and 255, |
or a symbolic name for a specific |
or a symbolic name for a specific TELNET command. |
.Dv TELNET |
|
command. |
|
.Ar cmd |
.Ar cmd |
can also be either |
can also be either |
.Ic help |
.Ic help |
|
|
commands. |
commands. |
.Bl -tag -width escape |
.Bl -tag -width escape |
.It Ic ayt |
.It Ic ayt |
If |
If TELNET is in |
.Tn TELNET |
|
is in |
|
.Ic localchars |
.Ic localchars |
mode, or |
mode, or |
.Dv LINEMODE |
.Dv LINEMODE |
|
|
character. |
character. |
.It Ic forw1 |
.It Ic forw1 |
.It Ic forw2 |
.It Ic forw2 |
If |
If TELNET is operating in |
.Tn TELNET |
|
is operating in |
|
.Dv LINEMODE , |
.Dv LINEMODE , |
these are the |
these are the |
characters that, when typed, cause partial lines to be |
characters that, when typed, cause partial lines to be |
|
|
character. |
character. |
.It Ic rlogin |
.It Ic rlogin |
This is the rlogin escape character. |
This is the rlogin escape character. |
If set, the normal |
If set, the normal TELNET |
.Tn TELNET |
|
escape character is ignored unless it is |
escape character is ignored unless it is |
preceded by this character at the beginning of a line. |
preceded by this character at the beginning of a line. |
This character, at the beginning of a line, followed by |
This character, at the beginning of a line, followed by |
|
|
.Dv TELNET LINEMODE |
.Dv TELNET LINEMODE |
option has |
option has |
been enabled. |
been enabled. |
Special characters are characters that get mapped to |
Special characters are characters that get mapped to TELNET |
.Tn TELNET |
|
commands sequences (like |
commands sequences (like |
.Ic ip |
.Ic ip |
or |
or |
|
|
.It Ic import |
.It Ic import |
Switch to the remote defaults for the special characters. |
Switch to the remote defaults for the special characters. |
The remote default characters are those of the remote system |
The remote default characters are those of the remote system |
at the time when the |
at the time when the TELNET connection was established. |
.Tn TELNET |
|
connection was established. |
|
.It Ic \&? |
.It Ic \&? |
Prints out help information for the |
Prints out help information for the |
.Ic slc |
.Ic slc |
|
|
.Ic ao |
.Ic ao |
or |
or |
.Ic quit |
.Ic quit |
characters are recognized (and transformed into |
characters are recognized (and transformed into TELNET sequences; see |
.Tn TELNET |
|
sequences; see |
|
.Ic set |
.Ic set |
above for details), |
above for details), |
.Nm |
.Nm |
|
|
until the remote system acknowledges (via a |
until the remote system acknowledges (via a |
.Dv TELNET TIMING MARK |
.Dv TELNET TIMING MARK |
option) |
option) |
that it has processed those |
that it has processed those TELNET sequences. |
.Tn TELNET |
|
sequences. |
|
The initial value for this toggle is |
The initial value for this toggle is |
.Dv TRUE |
.Dv TRUE |
if the terminal user had not |
if the terminal user had not |
|
|
.It Ic autologin |
.It Ic autologin |
If the remote side supports the |
If the remote side supports the |
.Dv TELNET AUTHENTICATION |
.Dv TELNET AUTHENTICATION |
option |
option TELNET attempts to use it to perform automatic authentication. |
.Tn TELNET |
|
attempts to use it to perform automatic authentication. |
|
If the |
If the |
.Dv AUTHENTICATION |
.Dv AUTHENTICATION |
option is not supported, the user's login |
option is not supported, the user's login |
|
|
.Ic intr |
.Ic intr |
and |
and |
.Ic quit |
.Ic quit |
characters), the resulting |
characters), the resulting TELNET sequence sent is followed by the |
.Tn TELNET |
|
sequence sent is followed by the |
|
.Dv TELNET SYNCH |
.Dv TELNET SYNCH |
sequence. |
sequence. |
This procedure |
This procedure |
.Em should |
.Em should |
cause the remote system to begin throwing away all previously |
cause the remote system to begin throwing away all previously |
typed input until both of the |
typed input until both of the TELNET |
.Tn TELNET |
|
sequences have been read and acted upon. |
sequences have been read and acted upon. |
The initial value of this toggle is |
The initial value of this toggle is |
.Dv FALSE . |
.Dv FALSE . |
|
|
characters (see |
characters (see |
.Ic set |
.Ic set |
above) are recognized locally, and transformed into (hopefully) appropriate |
above) are recognized locally, and transformed into (hopefully) appropriate |
.Tn TELNET |
TELNET control sequences |
control sequences |
|
(respectively |
(respectively |
.Ic ao , |
.Ic ao , |
.Ic ip , |
.Ic ip , |
|
|
.It Ic options |
.It Ic options |
Toggles the display of some internal |
Toggles the display of some internal |
.Nm |
.Nm |
protocol processing (having to do with |
protocol processing (having to do with TELNET options). |
.Tn TELNET |
|
options). |
|
The initial value for this toggle is |
The initial value for this toggle is |
.Dv FALSE . |
.Dv FALSE . |
.It Ic prettydump |
.It Ic prettydump |
|
|
.Ic netdata |
.Ic netdata |
command will be formatted in a more user readable format. |
command will be formatted in a more user readable format. |
Spaces are put between each character in the output, and the |
Spaces are put between each character in the output, and the |
beginning of any |
beginning of any TELNET |
.Tn TELNET |
|
escape sequence is preceded by a '*' to aid in locating them. |
escape sequence is preceded by a '*' to aid in locating them. |
.It Ic skiprc |
.It Ic skiprc |
When the skiprc toggle is |
When the skiprc toggle is |
.Dv TRUE , |
.Dv TRUE , |
.Tn TELNET |
TELNET skips the reading of the |
skips the reading of the |
|
.Pa \&.telnetrc |
.Pa \&.telnetrc |
file in the user's home |
file in the user's home |
directory when connections are opened. |
directory when connections are opened. |