summaryrefslogtreecommitdiff
path: root/usr.bin/telnet
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/telnet')
-rw-r--r--usr.bin/telnet/telnet.1309
1 files changed, 206 insertions, 103 deletions
diff --git a/usr.bin/telnet/telnet.1 b/usr.bin/telnet/telnet.1
index be47ca46c76..5e018140878 100644
--- a/usr.bin/telnet/telnet.1
+++ b/usr.bin/telnet/telnet.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: telnet.1,v 1.11 1998/09/05 17:41:47 deraadt Exp $
+.\" $OpenBSD: telnet.1,v 1.12 1998/10/30 00:24:38 aaron Exp $
.\" $NetBSD: telnet.1,v 1.5 1996/02/28 21:04:12 thorpej Exp $
.\"
.\" Copyright (c) 1983, 1990, 1993
@@ -108,10 +108,12 @@ BINARY option to be negotiated on output.
.It Fl S Ar tos
Sets the IP type-of-service (TOS) option for the telnet
connection to the value
-.Ar tos,
+.Ar tos ,
which can be a numeric TOS value
or, on systems that support it, a symbolic
-TOS name found in the /etc/iptos file.
+TOS name found in the
+.Pa /etc/iptos
+file.
.It Fl X Ar atype
Disables the
.Ar atype
@@ -131,12 +133,12 @@ otherwise it is the name associated with the user ID.
.It Fl b Ar hostalias
Uses
.Xr bind 2
-on the local socket to bind it to an aliased address (See
+on the local socket to bind it to an aliased address (see
.Xr ifconfig 8
-and the \*(Lqalias\*(Rq specifier) or to the address of
+and the ``alias'' specifier) or to the address of
another interface than the one naturally chosen by
.Xr connect 2 .
-This can be useful when connecting to services which uses IP addresses
+This can be useful when connecting to services which use IP addresses
for authentication and reconfiguration of the server is undesirable (or
impossible).
.It Fl c
@@ -149,7 +151,7 @@ command on this man page.)
Sets the initial value of the
.Ic debug
toggle to
-.Dv TRUE
+.Dv TRUE .
.It Fl e Ar escapechar
Sets the initial
.Nm
@@ -166,7 +168,9 @@ option allows the local credentials to be forwarded to the remote system.
.It Fl k Ar realm
If Kerberos authentication is being used, the
.Fl k
-option requests that telnet obtain tickets for the remote host in
+option requests that
+.Nm telnet
+obtain tickets for the remote host in
realm
.Ar realm
instead of the remote host's realm, as determined
@@ -222,11 +226,11 @@ Once a connection has been opened,
will attempt to enable the
.Dv TELNET LINEMODE
option.
-If this fails, then
+If this fails,
.Nm telnet
will revert to one of two input modes:
-either \*(Lqcharacter at a time\*(Rq
-or \*(Lqold line by line\*(Rq
+either ``character at a time''
+or ``old line by line''
depending on what the remote system supports.
.Pp
When
@@ -238,12 +242,12 @@ 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.
.Pp
-In \*(Lqcharacter at a time\*(Rq mode, most
+In ``character at a time'' mode, most
text typed is immediately sent to the remote host for processing.
.Pp
-In \*(Lqold line by line\*(Rq mode, all text is echoed locally,
+In ``old line by line'' 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
+The ``local echo character'' (initially ``^E'') may be used
to turn off and on the local echo
(this would mostly be used to enter passwords
without the password being echoed).
@@ -254,9 +258,9 @@ option is enabled, or if the
.Ic localchars
toggle is
.Dv TRUE
-(the default for \*(Lqold line by line\*(Lq; see below),
+(the default for ``old line by line''; see below),
the user's
-.Ic quit ,
+.Ic quit ,
.Ic intr ,
and
.Ic flush
@@ -298,7 +302,7 @@ While connected to a remote host,
.Nm telnet
command mode may be entered by typing the
.Nm telnet
-\*(Lqescape character\*(Rq (initially \*(Lq^]\*(Rq).
+``escape character'' (initially ``^]'').
When in command mode, the normal terminal editing conventions are available.
.Pp
The following
@@ -306,30 +310,36 @@ The following
commands are available.
Only enough of each command to uniquely identify it need be typed
(this is also true for arguments to the
-.Ic mode ,
+.Ic mode ,
.Ic set ,
-.Ic toggle ,
+.Ic toggle ,
.Ic unset ,
-.Ic slc ,
+.Ic slc ,
.Ic environ ,
and
.Ic display
commands).
.Pp
.Bl -tag -width "mode type"
-.It Ic auth Ar argument ...
-The auth command manipulates the information sent through the
+.It Ic auth Ar argument Op Ar ...
+The
+.Ic auth
+command manipulates the information sent through the
.Dv TELNET AUTHENTICATE
option. Valid arguments for the
auth command are as follows:
.Bl -tag -width "disable type"
.It Ic disable Ar type
-Disables the specified type of authentication. To
+Disables the specified
+.Ar type
+of authentication. To
obtain a list of available types, use the
.Ic auth disable \&?
command.
.It Ic enable Ar type
-Enables the specified type of authentication. To
+Enables the specified
+.Ar type
+of authentication. To
obtain a list of available types, use the
.Ic auth enable \&?
command.
@@ -341,29 +351,43 @@ authentication.
Close a
.Tn TELNET
session and return to command mode.
-.It Ic display Ar argument ...
+.It Ic display Ar argument Op Ar ...
Displays all, or some, of the
.Ic set
and
.Ic toggle
values (see below).
-.It Ic encrypt Ar argument ...
-The encrypt command manipulates the information sent through the
+.It Ic encrypt Ar argument Op Ar ...
+The
+.Ic encrypt
+command manipulates the information sent through the
.Dv TELNET ENCRYPT
option.
..Pp
Valid arguments for the encrypt command are as follows:
.Bl -tag -width Ar
.It Ic disable Ar type Ic [input|output]
-Disables the specified type of encryption. If you
-omit the input and output, both input and output
+Disables the specified
+.Ar type
+of encryption. If you
+omit
+.Ic input
+and
+.Ic output ,
+both input and output
are disabled. To obtain a list of available
types, use the
.Ic encrypt disable \&?
command.
.It Ic enable Ar type Ic [input|output]
-Enables the specified type of encryption. If you
-omit input and output, both input and output are
+Enables the specified
+.Ar type
+of encryption. If you
+omit
+.Ic input
+and
+.Ic output ,
+both input and output are
enabled. To obtain a list of available types, use the
.Ic encrypt enable \&?
command.
@@ -395,7 +419,10 @@ command.
.It Ic status
Lists the current status of encryption.
.It Ic stop Ic [input|output]
-Stops encryption. If you omit input and output,
+Stops encryption. If you omit
+.Ic input
+and
+.Ic output ,
encryption is on both input and output.
.It Ic type Ar type
Sets the default type of encryption to be used
@@ -405,7 +432,7 @@ or
.Ic encrypt stop
commands.
.El
-.It Ic environ Ar arguments...
+.It Ic environ Ar arguments Op Ar ...
The
.Ic environ
command is used to manipulate the
@@ -434,7 +461,7 @@ command are:
Define the variable
.Ar variable
to have a value of
-.Ar value.
+.Ar value .
Any variables defined by this command are automatically exported.
The
.Ar value
@@ -483,7 +510,7 @@ suspending a user's session for later reattachment,
the logout argument indicates that you
should terminate the session immediately.
.It Ic mode Ar type
-.Ar Type
+.Ar type
is one of several options, depending on the state of the
.Tn TELNET
session.
@@ -496,13 +523,13 @@ Disable the
.Dv TELNET LINEMODE
option, or, if the remote side does not understand the
.Dv LINEMODE
-option, then enter \*(Lqcharacter at a time\*(Lq mode.
+option, then enter ``character at a time'' mode.
.It Ic line
Enable the
.Dv TELNET LINEMODE
option, or, if the remote side does not understand the
.Dv LINEMODE
-option, then attempt to enter \*(Lqold-line-by-line\*(Lq mode.
+option, then attempt to enter ``old-line-by-line'' mode.
.It Ic isig Pq Ic \-isig
Attempt to enable (disable) the
.Dv TRAPSIG
@@ -559,7 +586,7 @@ will attempt to contact a
server at the default port.
The host specification may be either a host name (see
.Xr hosts 5 )
-or an Internet address specified in the \*(Lqdot notation\*(Rq (see
+or an Internet address specified in the ``dot notation'' (see
.Xr inet 3 ) .
The
.Fl l
@@ -576,7 +603,7 @@ the initial option negotiation is done.
After establishing a connection, the file
.Pa \&.telnetrc
in the
-user's home directory is opened. Lines beginning with a # are
+user's home directory is opened. Lines beginning with a ``#'' are
comment lines. Blank lines are ignored. Lines that begin
without white space are the start of a machine entry. The
first thing on the line is the name of the machine that is
@@ -591,8 +618,8 @@ command prompt.
Close any open
.Tn TELNET
session and exit
-.Nm telnet .
-An end of file (in command mode) will also close a session and exit.
+.Nm telnet .
+An end-of-file (in command mode) will also close a session and exit.
.It Ic send Ar arguments
Sends one or more special character sequences to the remote host.
The following are the arguments which may be specified
@@ -649,7 +676,7 @@ sequence.
.It Ic escape
Sends the current
.Nm telnet
-escape character (initially \*(Lq^\*(Rq).
+escape character (initially ``^]'').
.It Ic ga
Sends the
.Dv TELNET GA
@@ -689,21 +716,69 @@ urgent
data (and may not work if the remote system is a
.Bx 4.2
system -- if
-it doesn't work, a lower case \*(Lqr\*(Rq may be echoed on the terminal).
+it doesn't work, a lower case ``r'' may be echoed on the terminal).
.It Ic do Ar cmd
+Sends the
+.Dv TELNET DO
+.Ar cmd
+sequence.
+.Ar cmd
+can be either a decimal number between 0 and 255,
+or a symbolic name for a specific
+.Dv TELNET
+command.
+.Ar cmd
+can also be either
+.Ic help
+or
+.Ic \&?
+to print out help information, including
+a list of known symbolic names.
.It Ic dont Ar cmd
+Sends the
+.Dv TELNET DONT
+.Ar cmd
+sequence.
+.Ar cmd
+can be either a decimal number between 0 and 255,
+or a symbolic name for a specific
+.Dv TELNET
+command.
+.Ar cmd
+can also be either
+.Ic help
+or
+.Ic \&?
+to print out help information, including
+a list of known symbolic names.
.It Ic will Ar cmd
+Sends the
+.Dv TELNET WILL
+.Ar cmd
+sequence.
+.Ar cmd
+can be either a decimal number between 0 and 255,
+or a symbolic name for a specific
+.Dv TELNET
+command.
+.Ar cmd
+can also be either
+.Ic help
+or
+.Ic \&?
+to print out help information, including
+a list of known symbolic names.
.It Ic wont Ar cmd
Sends the
-.Dv TELNET DO
+.Dv TELNET WONT
.Ar cmd
sequence.
-.Ar Cmd
+.Ar cmd
can be either a decimal number between 0 and 255,
or a symbolic name for a specific
.Dv TELNET
command.
-.Ar Cmd
+.Ar cmd
can also be either
.Ic help
or
@@ -726,7 +801,7 @@ variables to a specific value or to
The special value
.Ic off
turns off the function associated with
-the variable, this is equivalent to using the
+the variable; this is equivalent to using the
.Ic unset
command.
The
@@ -750,7 +825,9 @@ commands.
.It Ic ayt
If
.Tn TELNET
-is in localchars mode, or
+is in
+.Ic localchars
+mode, or
.Dv LINEMODE
is enabled, and the status character is typed, a
.Dv TELNET AYT
@@ -760,8 +837,8 @@ preceding) is sent to the
remote host. The initial value for the "Are You There"
character is the terminal's status character.
.It Ic echo
-This is the value (initially \*(Lq^E\*(Rq) which, when in
-\*(Lqline by line\*(Rq mode, toggles between doing local echoing
+This is the value (initially ``^E'') which, when in
+``line by line'' mode, toggles between doing local echoing
of entered characters (for normal processing), and suppressing
echoing of entered characters (for entering, say, a password).
.It Ic eof
@@ -769,10 +846,12 @@ If
.Nm telnet
is operating in
.Dv LINEMODE
-or \*(Lqold line by line\*(Rq mode, entering this character
+or ``old line by line'' 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
+The initial value of the
+.Ic eof
+character is taken to be the terminal's
.Ic eof
character.
.It Ic erase
@@ -784,10 +863,9 @@ mode (see
.Ic toggle
.Ic localchars
below),
-.Sy and
-if
+and if
.Nm telnet
-is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
+is operating in ``character at a time'' mode, then when this
character is typed, a
.Dv TELNET EC
sequence (see
@@ -795,14 +873,16 @@ sequence (see
.Ic ec
above)
is sent to the remote system.
-The initial value for the erase character is taken to be
+The initial value for the
+.Ic erase
+character is taken to be
the terminal's
.Ic erase
character.
.It Ic escape
This is the
.Nm telnet
-escape character (initially \*(Lq^[\*(Rq) which causes entry
+escape character (initially ``^['') which causes entry
into
.Nm telnet
command mode (when connected to a remote system).
@@ -824,7 +904,9 @@ sequence (see
.Ic ao
above)
is sent to the remote host.
-The initial value for the flush character is taken to be
+The initial value for the
+.Ic flush
+character is taken to be
the terminal's
.Ic flush
character.
@@ -857,7 +939,9 @@ sequence (see
.Ic ip
above)
is sent to the remote host.
-The initial value for the interrupt character is taken to be
+The initial value for the
+.Ic interrupt
+character is taken to be
the terminal's
.Ic intr
character.
@@ -870,10 +954,9 @@ mode (see
.Ic toggle
.Ic localchars
below),
-.Ic and
-if
+and if
.Nm telnet
-is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
+is operating in ``character at a time'' mode, then when this
character is typed, a
.Dv TELNET EL
sequence (see
@@ -881,7 +964,9 @@ sequence (see
.Ic el
above)
is sent to the remote system.
-The initial value for the kill character is taken to be
+The initial value for the
+.Ic kill
+character is taken to be
the terminal's
.Ic kill
character.
@@ -890,11 +975,13 @@ If
.Nm telnet
is operating in
.Dv LINEMODE
-or \*(Lqold line by line\*(Lq mode, then this character is taken to
+or ``old line by line'' mode, then this character is taken to
be the terminal's
.Ic lnext
character.
-The initial value for the lnext character is taken to be
+The initial value for the
+.Ic lnext
+character is taken to be
the terminal's
.Ic lnext
character.
@@ -916,7 +1003,9 @@ sequence (see
.Ic brk
above)
is sent to the remote host.
-The initial value for the quit character is taken to be
+The initial value for the
+.Ic quit
+character is taken to be
the terminal's
.Ic quit
character.
@@ -925,11 +1014,13 @@ If
.Nm telnet
is operating in
.Dv LINEMODE
-or \*(Lqold line by line\*(Lq mode, then this character is taken to
+or old line by line'' mode, then this character is taken to
be the terminal's
.Ic reprint
character.
-The initial value for the reprint character is taken to be
+The initial value for the
+.Ic reprint
+character is taken to be
the terminal's
.Ic reprint
character.
@@ -939,12 +1030,14 @@ If set, the normal
.Tn TELNET
escape character is ignored unless it is
preceded by this character at the beginning of a line.
-This character, at the beginning of a line followed by
-a "." closes the connection; when followed by a ^Z it
+This character, at the beginning of a line, followed by
+a "." closes the connection; when followed by a ^Z it
suspends the
.Nm telnet
command. The initial state is to
-disable the rlogin escape character.
+disable the
+.Ic rlogin
+escape character.
.It Ic start
If the
.Dv TELNET TOGGLE-FLOW-CONTROL
@@ -953,7 +1046,9 @@ then this character is taken to
be the terminal's
.Ic start
character.
-The initial value for the start character is taken to be
+The initial value for the
+.Ic start
+character is taken to be
the terminal's
.Ic start
character.
@@ -965,7 +1060,9 @@ then this character is taken to
be the terminal's
.Ic stop
character.
-The initial value for the stop character is taken to be
+The initial value for the
+.Ic stop
+character is taken to be
the terminal's
.Ic stop
character.
@@ -985,7 +1082,9 @@ sequence (see
.Ic susp
above)
is sent to the remote host.
-The initial value for the suspend character is taken to be
+The initial value for the
+.Ic suspend
+character is taken to be
the terminal's
.Ic suspend
character.
@@ -1004,11 +1103,13 @@ If
.Nm telnet
is operating in
.Dv LINEMODE
-or \*(Lqold line by line\*(Lq mode, then this character is taken to
+or ``old line by line'' mode, then this character is taken to
be the terminal's
.Ic worderase
character.
-The initial value for the worderase character is taken to be
+The initial value for the
+.Ic worderase
+character is taken to be
the terminal's
.Ic worderase
character.
@@ -1063,10 +1164,10 @@ command.
.El
.It Ic status
Show the current status of
-.Nm telnet .
+.Nm telnet .
This includes the peer one is connected to, as well
as the current mode.
-.It Ic toggle Ar arguments ...
+.It Ic toggle Ar arguments Op Ar ...
Toggle (between
.Dv TRUE
and
@@ -1099,7 +1200,7 @@ and
are both
.Dv TRUE ,
then when the
-.Ic ao ,
+.Ic ao
or
.Ic quit
characters are recognized (and transformed into
@@ -1127,8 +1228,10 @@ When the
.Dv TELNET ENCRYPT
option is negotiated, by
default the actual encryption (decryption) of the data
-stream does not start automatically. The autoencrypt
-(autodecrypt) command states that encryption of the
+stream does not start automatically. The
+.Ic autoencrypt
+.Pq Ic autodecrypt
+command states that encryption of the
output (input) stream should be enabled as soon as
possible.
.Pp
@@ -1159,7 +1262,7 @@ then when either the
.Ic intr
or
.Ic quit
-characters is typed (see
+character is typed (see
.Ic set
above for descriptions of the
.Ic intr
@@ -1171,7 +1274,7 @@ sequence sent is followed by the
.Dv TELNET SYNCH
sequence.
This procedure
-.Ic should
+.Em should
cause the remote system to begin throwing away all previously
typed input until both of the
.Tn TELNET
@@ -1209,12 +1312,11 @@ a line feed.
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.
+only sends carriage return, but never line feeds.
The initial value for this toggle is
.Dv FALSE .
.It Ic debug
-Toggles socket level debugging (useful only to the
-.Ic super user ) .
+Toggles socket level debugging (useful only to the super-user).
The initial value for this toggle is
.Dv FALSE .
.It Ic encdebug
@@ -1223,9 +1325,9 @@ Turns on debugging information for the encryption code.
If this is
.Dv TRUE ,
then the
-.Ic flush ,
+.Ic flush ,
.Ic interrupt ,
-.Ic quit ,
+.Ic quit ,
.Ic erase ,
and
.Ic kill
@@ -1235,9 +1337,9 @@ above) are recognized locally, and transformed into (hopefully) appropriate
.Tn TELNET
control sequences
(respectively
-.Ic ao ,
+.Ic ao ,
.Ic ip ,
-.Ic brk ,
+.Ic brk ,
.Ic ec ,
and
.Ic el ;
@@ -1246,10 +1348,10 @@ see
above).
The initial value for this toggle is
.Dv TRUE
-in \*(Lqold line by line\*(Rq mode,
+in ``old line by line'' mode,
and
.Dv FALSE
-in \*(Lqcharacter at a time\*(Rq mode.
+in ``character at a time'' mode.
When the
.Dv LINEMODE
option is enabled, the value of
@@ -1261,12 +1363,14 @@ If
has ever been enabled, then
.Ic quit
is sent as
-.Ic abort ,
+.Ic abort ,
+and
+.Ic eof
and
-.Ic eof and
.Ic suspend
are sent as
-.Ic eof and
+.Ic eof
+and
.Ic susp
(see
.Ic send
@@ -1301,7 +1405,7 @@ When the skiprc toggle is
.Tn TELNET
skips the reading of the
.Pa \&.telnetrc
-file in the users home
+file in the user's home
directory when connections are opened. The initial
value for this toggle is
.Dv FALSE.
@@ -1325,9 +1429,9 @@ commands.
.El
.It Ic z
Suspend
-.Nm telnet .
+.Nm telnet .
This command only works when the user is using the
-.Xr csh 1 .
+.Xr csh 1 .
.It Ic \&! Op Ar command
Execute a single command in a subshell on the local
system. If
@@ -1343,7 +1447,7 @@ If a command is specified,
will print the help information for just that command.
.El
.Sh ENVIRONMENT
-.Nm Telnet
+.Nm telnet
uses at least the
.Ev HOME ,
.Ev SHELL ,
@@ -1362,15 +1466,14 @@ user customized telnet startup values
.El
.Sh HISTORY
The
-.Nm Telnet
+.Nm telnet
command appeared in
.Bx 4.2 .
.Sh NOTES
-.Pp
On some remote systems, echo has to be turned off manually when in
-\*(Lqold line by line\*(Rq mode.
+``old line by line'' mode.
.Pp
-In \*(Lqold line by line\*(Rq mode or
+In ``old line by line'' mode or
.Dv LINEMODE
the terminal's
.Ic eof