.\" SUCH DAMAGE.
.\"
.\" @(#)telnet.1 8.4 (Berkeley) 2/3/94
-.\"
-.so man1/tmac.doc
-.Dd February 3, 1994
-.Dt TELNET 1
-.Os BSD 4.2
-.Sh NAME
-.Nm telnet
-.Nd user interface to the
-.Tn TELNET
-protocol
-.Sh SYNOPSIS
-.Nm telnet
-.Op Fl 8
-.Op Fl E
-.Op Fl F
-.Op Fl K
-.Op Fl L
-.Op Fl S Ar tos
-.Op Fl X Ar authtype
-.Op Fl a
-.Op Fl c
-.Op Fl d
-.Op Fl e Ar escapechar
-.Op Fl f
-.Op Fl k Ar realm
-.Op Fl l Ar user
-.Op Fl n Ar tracefile
-.Op Fl r
-.Op Fl x
-.Oo
-.Ar host
-.Op port
-.Oc
-.Sh DESCRIPTION
-The
-.Nm telnet
-command
-is used to communicate with another host using the
-.Tn TELNET
-protocol.
-If
-.Nm telnet
+.\" "
+.so man1/header.doc
+.TH TELNET 1 \*h
+.SH NAME
+telnet \- user interface to the TELNET protocol
+.SH SYNOPSIS
+.B telnet
+[\fB\-8\fP] [\fB\-E\fP] [\fB\-F\fP] [\fB\-K\fP | \fB\-\-noautologin\fP]
+[\fB\-L\fP] [\fB\-S\fP \fItos\fP] [\fB\-X\fP \fIauthtype\fP] [\fB\-a\fP
+| \fB\-\-autologin\fP] [\fB\-c\fP] [\fB\-d\fP] [\fB\-e\fP
+\fIescapechar\fP] [\fB\-f\fP] [\fB\-k\fP \fIrealm\fP] [\fB\-l\fP
+\fIuser\fP] [\fB\-n\fP \fItracefile\fP] [\fB\-r\fP] [\fB\-x\fP |
+\fB\-\-encrypt\fP] [\fB\-\-noencrypt\fP] [\fIhost\fP [\fIport\fP]]
+.SH DESCRIPTION
+The
+.B telnet
+command is used to communicate with another host using the
+.SM TELNET
+protocol. If
+.B telnet
is invoked without the
-.Ar host
-argument, it enters command mode,
-indicated by its prompt
-.Pq Nm telnet\&> .
-In this mode, it accepts and executes the commands listed below.
-If it is invoked with arguments, it performs an
-.Ic open
+.I host
+argument, it enters command mode, indicated by its prompt (
+.BR telnet\&> ).
+In this mode, it accepts and executes the commands listed below. If it
+is invoked with arguments, it performs an
+.B open
command with those arguments.
-.Pp
-Options:
-.Bl -tag -width indent
-.It Fl 8
-Specifies an 8-bit data path. This causes an attempt to
-negotiate the
-.Dv TELNET BINARY
+.SH OPTIONS
+.TP
+.B \-8
+Specify an 8-bit data path. This causes an attempt to negotiate the
+.SM TELNET BINARY
option on both input and output.
-.It Fl E
-Stops any character from being recognized as an escape character.
-.It Fl F
-If Kerberos V5 authentication is being used, the
-.Fl F
-option allows the local credentials to be forwarded
-to the remote system, including any credentials that
-have already been forwarded into the local environment.
-.It Fl K
-Specifies no automatic login to the remote system.
-.It Fl L
-Specifies an 8-bit data path on output. This causes the
-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,
-which can be a numeric TOS value
-or, on systems that support it, a symbolic
-TOS name found in the /etc/iptos file.
-.It Fl X Ar atype
-Disables the
-.Ar atype
+.TP
+.B \-E
+Stop any character from being recognized as an escape character.
+.TP
+\fB\-F\fP | \fB\-\-forwardable\fP
+forward a
+.I forwardable
+copy of the local credentials to the remote system.
+.TP
+.B \-\-noforwardable
+make any forwarded tickets non-forwardable. This is useful for
+overriding the application defaults in the host's
+.IR krb5.conf (5)
+file.
+.TP
+\fB\-K\fP | \fB\-\-noautologin\fP
+Specify no automatic login to the remote system.
+.TP
+.B \-L
+Specify an 8-bit data path on output. This causes the BINARY option to
+be negotiated on output.
+.TP
+\fB\-S\fP \fItos\fP
+Set the IP type-of-service (TOS) option for the telnet connection to the
+value
+.I tos,
+which can be a numeric TOS value or, on systems that support it, a
+symbolic TOS name found in the /etc/iptos file.
+.TP
+\fB\-X\fP \fIatype\fP
+Disable the
+.I atype
type of authentication.
-.It Fl a
-Attempt automatic login.
-Currently, this sends the user name via the
-.Ev USER
-variable
-of the
-.Ev ENVIRON
-option if supported by the remote system.
-The name used is that of the current user as returned by
-.Xr getlogin 2
-if it agrees with the current user ID,
-otherwise it is the name associated with the user ID.
-.It Fl c
-Disables the reading of the user's
-.Pa \&.telnetrc
+.TP
+\fB\-a\fP | \fB\-\-autologin\fP
+Attempt automatic login. This sends the user name via the
+.SM USER
+variable of the
+.SM ENVIRON
+option, if supported by the remote system. The name used is that of the
+current user as returned by
+.IR getlogin (2)
+if it agrees with the current user ID; otherwise it is the name
+associated with the user ID.
+.TP
+.B \-c
+Disable the reading of the user's
+.B \&.telnetrc
file. (See the
-.Ic toggle skiprc
+.B toggle skiprc
command on this man page.)
-.It Fl d
-Sets the initial value of the
-.Ic debug
-toggle to
-.Dv TRUE
-.It Fl e Ar escape char
-Sets the initial
-.Nm
-.Nm telnet
+.TP
+.B \-d
+Set the initial value of the
+.B debug
+flag to TRUE
+.TP
+\fB\-e\fP \fIescape char\fP
+Set the initial
+.B telnet
escape character to
-.Ar escape char.
+.I escape char.
If
-.Ar escape char
-is omitted, then
-there will be no escape character.
-.It Fl f
-If Kerberos V5 authentication is being used, the
-.Fl f
-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
-realm realm instead of the remote host's realm, as determined
-by
-.Xr krb_realmofhost 3 .
-.It Fl l Ar user
-When connecting to the remote system, if the remote system
-understands the
-.Ev ENVIRON
+.I escape char
+is omitted, then there will be no escape character.
+.TP
+\fB\-f\fP | \fB\-\-forward\fP
+forward a copy of the local credentials to the remote system.
+.TP
+.B \-\-noforward
+disable ticket forwarding. This is useful for overriding the
+application defaults in the host's
+.IR krb5.conf (5)
+file.
+.TP
+\fB\-k\fP \fIrealm\fP
+If Kerberos authentication is being used, request that telnet obtain
+tickets for the remote host in realm
+.I realm
+instead of the remote host's realm, as determined by
+.IR krb_realmofhost (3).
+.TP
+\fB\-l\fP \fIuser\fP
+If the remote system understands the
+.SM ENVIRON
option, then
-.Ar user
-will be sent to the remote system as the value for the variable USER.
+.I user
+will be sent to the remote system as the value for the variable
+.SM USER.
This option implies the
-.Fl a
-option.
-This option may also be used with the
-.Ic open
+.B \-a
+option. This option may also be used with the
+.B open
command.
-.It Fl n Ar tracefile
-Opens
-.Ar tracefile
-for recording trace information.
-See the
-.Ic set tracefile
+.TP
+\fB\-n\fP \fItracefile\fP
+Open
+.I tracefile
+for recording trace information. See the
+.B set tracefile
command below.
-.It Fl r
-Specifies a user interface similar to
-.Xr rlogin 1 .
-In this
-mode, the escape character is set to the tilde (~) character,
-unless modified by the -e option.
-.It Fl x
-Turns on encryption of the data stream if possible. This
-option is not available outside of the United States and
-Canada.
-.It Ar host
-Indicates the official name, an alias, or the Internet address
-of a remote host.
-.It Ar port
-Indicates a port number (address of an application). If a number is
-not specified, the default
-.Nm telnet
-port is used.
-.El
-.Pp
-When in rlogin mode, a line of the form ~. disconnects from the
-remote host; ~ is the telnet escape character.
-Similarly, the line ~^Z suspends the telnet session.
-The line ~^] escapes to the normal telnet escape prompt.
-.Pp
+.TP
+.B \-r
+Specify a user interface similar to
+.IR rlogin (1).
+In this mode, the escape character is set to the tilde (~) character,
+unless modified by the
+.B \-e
+option.
+.TP
+\fB\-x\fP | \fB\-\-encrypt\fP
+Turn on encryption of the data stream.
+.TP
+.B \-\-noencrypt
+disable encryption. This is useful for overriding the application
+defaults in the host's
+.IR krb5.conf (5)
+file.
+.TP
+.I host
+Indicates the name, alias, or Internet address of the remote host.
+.TP
+.I port
+Indicates a port number (address of an application). If the port is not
+specified, the default
+.B telnet
+port (23) is used.
+.PP
+When in rlogin mode, ~ is the telnet escape character; a line of the
+form ~. disconnects from the remote host. Similarly, the line ~^Z
+suspends the telnet session. The line ~^] escapes to the normal telnet
+escape prompt.
+.PP
Once a connection has been opened,
-.Nm telnet
+.B telnet
will attempt to enable the
-.Dv TELNET LINEMODE
-option.
-If this fails, then
-.Nm telnet
-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.
-.Pp
-When
-.Dv LINEMODE
-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.
-.Pp
-In \*(Lqcharacter at a time\*(Rq 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,
-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).
-.Pp
-If the
-.Dv LINEMODE
-option is enabled, or if the
-.Ic localchars
-toggle is
-.Dv TRUE
-(the default for \*(Lqold line by line\*(Lq; see below),
-the user's
-.Ic quit ,
-.Ic intr ,
+.SM TELNET LINEMODE
+option. If this fails, then
+.B telnet
+will revert to one of two input modes: either ``character at a time'' or
+``old line by line,'' depending on what the remote system supports.
+.PP
+When
+.SM LINEMODE
+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.
+.PP
+In ``character at a time'' mode, most text typed is immediately sent to
+the remote host for processing.
+.PP
+In ``old line by line'' mode, all text is echoed locally, and (normally)
+only completed lines are sent to the remote host. 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).
+.PP
+If the LINEMODE option is enabled, or if the
+.B localchars
+flag is TRUE (the default for ``old line by line''; see below), the
+user's
+.BR quit ,
+.BR intr ,
and
-.Ic flush
+.BR flush
characters are trapped locally, and sent as
-.Tn TELNET
-protocol sequences to the remote side.
-If
-.Dv LINEMODE
+.SM TELNET
+protocol sequences to the remote side. If
+.SM LINEMODE
has ever been enabled, then the user's
-.Ic susp
+.B susp
and
-.Ic eof
+.B eof
are also sent as
-.Tn TELNET
-protocol sequences,
-and
-.Ic quit
-is sent as a
-.Dv TELNET ABORT
-instead of
-.Dv BREAK
+.SM TELNET
+protocol sequences, and
+.B quit
+is sent as a
+.SM TELNET ABORT
+instead of
+.SM BREAK.
There are options (see
-.Ic toggle
-.Ic autoflush
+.B toggle autoflush
and
-.Ic toggle
-.Ic autosynch
-below)
-which cause this action to flush subsequent output to the terminal
-(until the remote host acknowledges the
-.Tn TELNET
-sequence) and flush previous terminal input
-(in the case of
-.Ic quit
+.B toggle autosynch
+below) which cause this action to flush subsequent output to the
+terminal (until the remote host acknowledges the
+.SM TELNET
+sequence) and flush previous terminal input (in the case of
+.B quit
and
-.Ic intr ) .
-.Pp
+.BR intr ).
+.PP
While connected to a remote host,
-.Nm telnet
+.B telnet
command mode may be entered by typing the
-.Nm telnet
-\*(Lqescape character\*(Rq (initially \*(Lq^]\*(Rq).
-When in command mode, the normal terminal editing conventions are available.
-.Pp
+.B telnet
+``escape character'' (initially ``^]''). When in command mode, the
+normal terminal editing conventions are available.
+.PP
The following
-.Nm telnet
-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 set ,
-.Ic toggle ,
-.Ic unset ,
-.Ic slc ,
-.Ic environ ,
+.B telnet
+commands are available. Only enough of each command to uniquely
+identify it need be typed (this is also true for arguments to the
+.BR mode ,
+.BR set ,
+.BR toggle ,
+.BR unset ,
+.BR slc ,
+.BR environ ,
and
-.Ic display
+.B display
commands).
-.Pp
-.Bl -tag -width "mode type"
-.It Ic auth Ar argument ...
+.PP
+.TP
+\fBauth\fP \fIargument ...\fP
The 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
-obtain a list of available types, use the
-.Ic auth disable \&?
+.SM TELNET AUTHENTICATE
+option. Valid arguments for the auth command are as
+follows:
+.RS
+.TP
+\fBdisable\fP \fItype\fP
+Disables the specified type of authentication. To obtain a list of
+available types, use the
+.B auth disable \&?
command.
-.It Ic enable Ar type
-Enables the specified type of authentication. To
-obtain a list of available types, use the
-.Ic auth enable \&?
+.TP
+\fBenable\fP \fItype\fP
+Enables the specified type of authentication. To obtain a list of
+available types, use the
+.B auth enable \&?
command.
-.It Ic status
-Lists the current status of the various types of
-authentication.
-.El
-.It Ic close
+.TP
+.B status
+Lists the current status of the various types of authentication.
+.RE
+.TP
+.B close
Close a
-.Tn TELNET
+.SM TELNET
session and return to command mode.
-.It Ic display Ar argument ...
-Displays all, or some, of the
-.Ic set
+.TP
+\fBdisplay\fP \fIargument ...\fP
+Displays some or all of the
+.B set
and
-.Ic toggle
+.B toggle
values (see below).
-.It Ic encrypt Ar argument ...
+.TP
+\fBencrypt\fP \fIargument ...\fP
The encrypt command manipulates the information sent through the
-.Dv TELNET ENCRYPT
+.SM TELNET ENCRYPT
option.
-.Pp
+.PP
Note: Because of export controls, the
-.Dv TELNET ENCRYPT
+.SM TELNET ENCRYPT
option is not supported outside of the United States and Canada.
-.Pp
+.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
-are disabled. To obtain a list of available
-types, use the
-.Ic encrypt disable \&?
+.RS
+.TP
+\fBdisable\fP \fItype\fP [\fBinput\fP|\fBoutput\fP]
+Disables the specified type of encryption. If you omit the input and
+output, both input and output are disabled. To obtain a list of
+available types, use the
+.B 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
-enabled. To obtain a list of available types, use the
-.Ic encrypt enable \&?
+.TP
+\fBenable\fP \fItype]fP [\fBinput\fP|\fBoutput\fP]
+Enables the specified type of encryption. If you omit input and output,
+both input and output are enabled. To obtain a list of available types,
+use the
+.B encrypt enable \&?
command.
-.It Ic input
+.TP
+.B input
This is the same as the
-.Ic encrypt start input
+.B encrypt start input
command.
-.It Ic -input
+.TP
+.B \-input
This is the same as the
-.Ic encrypt stop input
+.B encrypt stop input
command.
-.It Ic output
+.TP
+.B output
This is the same as the
-.Ic encrypt start output
+.B encrypt start output
command.
-.It Ic -output
+.TP
+.B \-output
This is the same as the
-.Ic encrypt stop output
+.B encrypt stop output
command.
-.It Ic start Ic [input|output]
+.TP
+\fBstart\fP [\fBinput\fP|\fBoutput\fP]
Attempts to start encryption. If you omit
-.Ic input
+.B input
and
-.Ic output,
-both input and output are enabled. To
-obtain a list of available types, use the
-.Ic encrypt enable \&?
+.BR output ,
+both input and output are enabled. To obtain a list of available types,
+use the
+.B encrypt enable \&?
command.
-.It Ic status
+.TP
+.B status
Lists the current status of encryption.
-.It Ic stop Ic [input|output]
-Stops encryption. If you omit input and output,
-encryption is on both input and output.
-.It Ic type Ar type
-Sets the default type of encryption to be used
-with later
-.Ic encrypt start
+.TP
+\fBstop\fP [\fBinput\fP|\fBoutput\fP]
+Stops encryption. If you omit input and output, encryption is on both
+input and output.
+.TP
+\fBtype\fP \fItype\fP
+Sets the default type of encryption to be used with later
+.B encrypt start
or
-.Ic encrypt stop
+.B encrypt stop
commands.
-.El
-.It Ic environ Ar arguments...
+.RE
+.TP
+\fBenviron\fP \fIarguments ...\fP
The
-.Ic environ
-command is used to manipulate the
-the variables that my be sent through the
-.Dv TELNET ENVIRON
-option.
-The initial set of variables is taken from the users
+.B environ
+command is used to manipulate the the variables that my be sent through
+the
+.SM TELNET ENVIRON
+option. The initial set of variables is taken from the users
environment, with only the
-.Ev DISPLAY
+.SM DISPLAY
and
-.Ev PRINTER
-variables being exported by default.
-The
-.Ev USER
+.SM PRINTER
+variables being exported by default. The
+.SM USER
variable is also exported if the
-.Fl a
+.B \-a
or
-.Fl l
+.B \-l
options are used.
-.br
+.PP
Valid arguments for the
-.Ic environ
+.B environ
command are:
-.Bl -tag -width Fl
-.It Ic define Ar variable value
+.RS
+.TP
+\fBdefine\fP \fIvariable value\fP
Define the variable
-.Ar variable
+.I variable
to have a value of
-.Ar value.
-Any variables defined by this command are automatically exported.
-The
-.Ar value
-may be enclosed in single or double quotes so
-that tabs and spaces may be included.
-.It Ic undefine Ar variable
+.IR value .
+Any variables defined by this command are automatically exported. The
+.I value
+may be enclosed in single or double quotes so that tabs and spaces may
+be included.
+.TP
+\fBundefine\fP \fIvariable\fP
Remove
-.Ar variable
+.I variable
from the list of environment variables.
-.It Ic export Ar variable
+.TP
+\fBexport\fP \fIvariable\fP
Mark the variable
-.Ar variable
+.I variable
to be exported to the remote side.
-.It Ic unexport Ar variable
+.TP
+\fBunexport\fP \fIvariable\fP
Mark the variable
-.Ar variable
-to not be exported unless
-explicitly asked for by the remote side.
-.It Ic list
-List the current set of environment variables.
-Those marked with a
-.Cm *
-will be sent automatically,
-other variables will only be sent if explicitly requested.
-.It Ic \&?
+.I variable
+to not be exported unless explicitly asked for by the remote side.
+.TP
+.B list
+List the current set of environment variables. Those marked with a \&*
+will be sent automatically; other variables will only be sent if
+explicitly requested.
+.TP
+.B \&?
Prints out help information for the
-.Ic environ
+.B environ
command.
-.El
-.It Ic logout
+.RE
+.TP
+.B logout
Sends the
-.Dv TELNET LOGOUT
-option to the remote side.
-This command is similar to a
-.Ic close
+.SM TELNET LOGOUT
+option to the remote side. This command is similar to a
+.B close
command; however, if the remote side does not support the
-.Dv LOGOUT
-option, nothing happens.
-If, however, the remote side does support the
-.Dv LOGOUT
+.SM LOGOUT
+option, nothing happens. If, however, the remote side does support the
+.SM LOGOUT
option, this command should cause the remote side to close the
-.Tn TELNET
-connection.
-If the remote side also supports the concept of
-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
+.SM TELNET
+connection. If the remote side also supports the concept of suspending
+a user's session for later reattachment, the logout argument indicates
+that you should terminate the session immediately.
+.TP
+\fBmode\fP \fItype\fP
+.I Type
is one of several options, depending on the state of the
-.Tn TELNET
-session.
-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.
-.Bl -tag -width Ar
-.It Ic character
+.SM TELNET
+session. 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.
+.RS
+.TP
+.B character
Disable the
-.Dv TELNET LINEMODE
+.SM TELNET LINEMODE
option, or, if the remote side does not understand the
-.Dv LINEMODE
-option, then enter \*(Lqcharacter at a time\*(Lq mode.
-.It Ic line
+.SM LINEMODE
+option, then enter ``character at a time'' mode.
+.TP
+.B line
Enable the
-.Dv TELNET LINEMODE
+.SM 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.
-.It Ic isig Pq Ic \-isig
+.SM LINEMODE
+option, then attempt to enter ``old-line-by-line'' mode.
+.TP
+\fBisig\fP (\fI\-isig\fP)
Attempt to enable (disable) the
-.Dv TRAPSIG
+.SM TRAPSIG
mode of the
-.Dv LINEMODE
-option.
-This requires that the
-.Dv LINEMODE
+.SM LINEMODE
+option. This requires that the
+.SM LINEMODE
option be enabled.
-.It Ic edit Pq Ic \-edit
-Attempt to enable (disable) the
-.Dv EDIT
+.TP
+\fBedit\fP (\fB\-edit\fP)
+Attempt to enable (disable) the
+.SM EDIT
mode of the
-.Dv LINEMODE
-option.
-This requires that the
-.Dv LINEMODE
+.SM LINEMODE
+option. This requires that the
+.SM LINEMODE
option be enabled.
-.It Ic softtabs Pq Ic \-softtabs
-Attempt to enable (disable) the
-.Dv SOFT_TAB
+.TP
+\fBsofttabs\fP (\fB\-softtabs\fP)
+Attempt to enable (disable) the
+.SM SOFT_TAB
mode of the
-.Dv LINEMODE
-option.
-This requires that the
-.Dv LINEMODE
+.SM LINEMODE
+option. This requires that the
+.SM LINEMODE
option be enabled.
-.It Ic litecho Pq Ic \-litecho
+.TP
+\fBlitecho\fP (\fB\-litecho\fP)
Attempt to enable (disable) the
-.Dv LIT_ECHO
+.SM LIT_ECHO
mode of the
-.Dv LINEMODE
-option.
-This requires that the
-.Dv LINEMODE
+.SM LINEMODE
+option. This requires that the
+.SM LINEMODE
option be enabled.
-.It Ic \&?
+.TP
+.B \&?
Prints out help information for the
-.Ic mode
+.B mode
command.
-.El
-.It Xo
-.Ic open Ar host
-.Oo Op Fl l
-.Ar user
-.Oc Ns Oo Fl
-.Ar port Oc
-.Xc
-Open a connection to the named host.
-If no port number
-is specified,
-.Nm telnet
+.RE
+.TP
+\fBopen\fP \fIhost\fP [\fB-a\fP] [[\fB\-l\fP] \fIuser\fP] [\fB\-\fP\fIport\fP]
+Open a connection to the named host. If no port number is specified,
+.B telnet
will attempt to contact a
-.Tn TELNET
-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
-.Xr inet 3 ) .
-The
-.Op Fl l
-option may be used to specify the user name
-to be passed to the remote system via the
-.Ev ENVIRON
+.SM TELNET
+server at the default port. The host specification may be either a host
+name (see
+.IR hosts (5)
+or an Internet address specified in the ``dot notation'' (see
+.IR inet (3).
+After establishing a connection, the file
+.B \&.telnetrc
+in the 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 being connected to. The rest of the
+line, and successive lines that begin with white space are assumed to be
+.B telnet
+commands and are processed as if they had been typed in manually to the
+.B telnet
+command prompt.
+.RS
+.TP
+.B \-a
+Attempt automatic login. This sends the user name via the
+.SM USER
+variable of the
+.SM ENVIRON
+option, if supported by the remote system. The name used is that of the
+current user as returned by
+.IR getlogin (2)
+if it agrees with the current user ID; otherwise it is the name
+associated with the user ID.
+.TP
+[\fB\-l\fP] \fIuser\fP
+may be used to specify the user name to be passed to the remote system
+via the
+.SM ENVIRON
option.
+.TP
+\fB\-\fP\fIport\fP
When connecting to a non-standard port,
-.Nm telnet
+.B telnet
omits any automatic initiation of
-.Tn TELNET
-options. When the port number is preceded by a minus sign,
-the initial option negotiation is done.
-After establishing a connection, the file
-.Pa \&.telnetrc
-in the
-users 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
-being connected to. The rest of the line, and successive
-lines that begin with white space are assumed to be
-.Nm telnet
-commands and are processed as if they had been typed
-in manually to the
-.Nm telnet
-command prompt.
-.It Ic quit
+.SM TELNET
+options. When the port number is preceded by a minus sign, the initial
+option negotiation is done.
+.RE
+.TP
+.B quit
Close any open
-.Tn TELNET
+.SM TELNET
session and exit
-.Nm telnet .
+.BR 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
-(more than one argument may be specified at a time):
-.Pp
-.Bl -tag -width escape
-.It Ic abort
+.TP
+\fBsend\fP \fIarguments\fP
+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):
+.PP
+.RS
+.TP
+.B abort
Sends the
-.Dv TELNET ABORT
-(Abort
-processes)
-sequence.
-.It Ic ao
+.SM TELNET ABORT
+(Abort processes) sequence.
+.TP
+.B ao
Sends the
-.Dv TELNET AO
+.SM TELNET AO
(Abort Output) sequence, which should cause the remote system to flush
all output
-.Em from
+.I from
the remote system
-.Em to
+.I to
the user's terminal.
-.It Ic ayt
+.TP
+.B ayt
Sends the
-.Dv TELNET AYT
-(Are You There)
-sequence, to which the remote system may or may not choose to respond.
-.It Ic brk
+.SM TELNET AYT
+(Are You There) sequence, to which the remote system may or may not
+choose to respond.
+.TP
+.B brk
Sends the
-.Dv TELNET BRK
-(Break) sequence, which may have significance to the remote
-system.
-.It Ic ec
+.SM TELNET BRK
+(Break) sequence, which may have significance to the remote system.
+.TP
+.B ec
Sends the
-.Dv TELNET EC
-(Erase Character)
-sequence, which should cause the remote system to erase the last character
-entered.
-.It Ic el
+.SM TELNET EC
+(Erase Character) sequence, which should cause the remote system to
+erase the last character entered.
+.TP
+.B el
Sends the
-.Dv TELNET EL
-(Erase Line)
-sequence, which should cause the remote system to erase the line currently
-being entered.
-.It Ic eof
+.SM TELNET EL
+(Erase Line) sequence, which should cause the remote system to erase the
+line currently being entered.
+.TP
+.B eof
Sends the
-.Dv TELNET EOF
-(End Of File)
-sequence.
-.It Ic eor
+.SM TELNET EOF
+(End Of File) sequence.
+.TP
+.B eor
Sends the
-.Dv TELNET EOR
-(End of Record)
-sequence.
-.It Ic escape
+.SM TELNET EOR
+(End of Record) sequence.
+.TP
+.B escape
Sends the current
-.Nm telnet
-escape character (initially \*(Lq^\*(Rq).
-.It Ic ga
+.b telnet
+escape character (initially ``^''.
+.TP
+.B ga
Sends the
-.Dv TELNET GA
-(Go Ahead)
-sequence, which likely has no significance to the remote system.
-.It Ic getstatus
+.SM TELNET GA
+(Go Ahead) sequence, which likely has no significance to the remote
+system.
+.TP
+.B getstatus
If the remote side supports the
-.Dv TELNET STATUS
+.SM TELNET STATUS
command,
-.Ic getstatus
-will send the subnegotiation to request that the server send
-its current option status.
-.It Ic ip
+.B getstatus
+will send the subnegotiation to request that the server send its current
+option status.
+.TP
+.B ip
Sends the
-.Dv TELNET IP
-(Interrupt Process) sequence, which should cause the remote
-system to abort the currently running process.
-.It Ic nop
+.SM TELNET IP
+(Interrupt Process) sequence, which should cause the remote system to
+abort the currently running process.
+.TP
+.B nop
Sends the
-.Dv TELNET NOP
-(No OPeration)
-sequence.
-.It Ic susp
+.SM TELNET NOP
+(No OPeration) sequence.
+.TP
+.B susp
Sends the
-.Dv TELNET SUSP
-(SUSPend process)
-sequence.
-.It Ic synch
+.SM TELNET SUSP
+(SUSPend process) sequence.
+.TP
+.B synch
Sends the
-.Dv TELNET SYNCH
-sequence.
-This sequence causes the remote system to discard all previously typed
-(but not yet read) input.
-This sequence is sent as
-.Tn TCP
-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 Ic do Ar cmd
-.It Ic dont Ar cmd
-.It Ic will Ar cmd
-.It Ic wont Ar cmd
+.SM TELNET SYNCH
+sequence. This sequence causes the remote system to discard all
+previously typed (but not yet read) input. This sequence is sent as
+.SM TCP
+urgent data (and may not work if the remote system is a 4.2BSD system --
+if it doesn't work, a lower case ``r'' may be echoed on the terminal).
+.TP
+\fBdo\fP \fIcmd\fP
+.TP
+\fBdont\fP \fIcmd\fP
+.TP
+\fBwill\fP \fIcmd\fP
+.TP
+\fBwont\fP \fIcmd\fP
Sends the
-.Dv TELNET DO
-.Ar cmd
+.SM TELNET DO
+.I cmd
sequence.
-.Ar Cmd
-can be either a decimal number between 0 and 255,
-or a symbolic name for a specific
-.Dv TELNET
+.I Cmd
+can be either a decimal number between 0 and 255, or a symbolic name for
+a specific
+.SM TELNET
command.
-.Ar Cmd
+.I Cmd
can also be either
-.Ic help
+.B help
or
-.Ic \&?
-to print out help information, including
-a list of known symbolic names.
-.It Ic \&?
+.B \&?
+to print out help information, including a list of known symbolic names.
+.TP
+.B \&?
Prints out help information for the
-.Ic send
+.B send
command.
-.El
-.It Ic set Ar argument value
-.It Ic unset Ar argument value
+.RE
+.TP
+\fBset\fP \fIargument value\fP
+.TP
+\fBunset\fP \fIargument value\fP
The
-.Ic set
+.B set
command will set any one of a number of
-.Nm telnet
+.B telnet
variables to a specific value or to
-.Dv TRUE .
+.SM TRUE.
The special value
-.Ic off
-turns off the function associated with
-the variable, this is equivalent to using the
-.Ic unset
-command.
-The
-.Ic unset
+.B off
+turns off the function associated with the variable; this is equivalent
+to using the
+.B unset
+command. The
+.B unset
command will disable or set to
-.Dv FALSE
-any of the specified functions.
-The values of variables may be interrogated with the
-.Ic display
-command.
-The variables which may be set or unset, but not toggled, are
+.SM FALSE
+any of the specified functions. The values of variables may be
+interrogated with the
+.B display
+command. The variables which may be set or unset, but not toggled, are
listed here. In addition, any of the variables for the
-.Ic toggle
-command may be explicitly set or unset using
-the
-.Ic set
+.B toggle
+command may be explicitly set or unset using the
+.B set
and
-.Ic unset
+.B unset
commands.
-.Bl -tag -width escape
-.It Ic ayt
+.RS
+.TP
+.B ayt
If
-.Tn TELNET
+.B telnet
is in localchars mode, or
-.Dv LINEMODE
+.SM LINEMODE
is enabled, and the status character is typed, a
-.Dv TELNET AYT
+.SM TELNET AYT
sequence (see
-.Ic send ayt
-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
-of entered characters (for normal processing), and suppressing
-echoing of entered characters (for entering, say, a password).
-.It Ic eof
+.B send ayt
+preceding) is sent to the remote host. The initial value for the "Are
+You There" character is the terminal's status character.
+.TP
+.B echo
+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).
+.TP
+.B eof
If
-.Nm telnet
+.B telnet
is operating in
-.Dv LINEMODE
-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
-.Ic eof
+.SM LINEMODE
+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
+.B eof
character.
-.It Ic erase
+.TP
+.B erase
If
-.Nm telnet
+.B telnet
is in
-.Ic localchars
+.b localchars
mode (see
-.Ic toggle
-.Ic localchars
+.B toggle localchars
below),
-.Sy and
+.I and
if
-.Nm telnet
-is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
-character is typed, a
-.Dv TELNET EC
+.B telnet
+is operating in ``character at a time'' mode, then when this character
+is typed, a
+.SM TELNET EC
sequence (see
-.Ic send
-.Ic ec
-above)
-is sent to the remote system.
-The initial value for the erase character is taken to be
-the terminal's
-.Ic erase
+.B send ec
+above) is sent to the remote system. The initial value for the erase
+character is taken to be the terminal's
+.B erase
character.
-.It Ic escape
+.TP
+.B escape
This is the
-.Nm telnet
-escape character (initially \*(Lq^[\*(Rq) which causes entry
-into
-.Nm telnet
+.B telnet
+escape character (initially ``^['') which causes entry into
+.B telnet
command mode (when connected to a remote system).
-.It Ic flushoutput
+.TP
+.B flushoutput
If
-.Nm telnet
+.B telnet
is in
-.Ic localchars
+.B localchars
mode (see
-.Ic toggle
-.Ic localchars
-below)
-and the
-.Ic flushoutput
+.B toggle localchars
+below) and the
+.B flushoutput
character is typed, a
-.Dv TELNET AO
+.SM TELNET AO
sequence (see
-.Ic send
-.Ic ao
-above)
-is sent to the remote host.
-The initial value for the flush character is taken to be
-the terminal's
-.Ic flush
+.B send ao
+above) is sent to the remote host. The initial value for the flush
+character is taken to be the terminal's
+.B flush
character.
-.It Ic forw1
-.It Ic forw2
+.TP
+.B forw1
+.TP
+.B forw2
If
-.Tn TELNET
+.B telnet
is operating in
-.Dv LINEMODE ,
-these are the
-characters that, when typed, cause partial lines to be
-forwarded to the remote system. The initial value for
-the forwarding characters are taken from the terminal's
-eol and eol2 characters.
-.It Ic interrupt
+.SM LINEMODE,
+these are the characters that, when typed, cause partial lines to be
+forwarded to the remote system. The initial value for the forwarding
+characters are taken from the terminal's eol and eol2 characters.
+.TP
+.B interrupt
If
-.Nm telnet
+.B telnet
is in
-.Ic localchars
+.B localchars
mode (see
-.Ic toggle
-.Ic localchars
-below)
-and the
-.Ic interrupt
+.B toggle localchars
+below) and the
+.B interrupt
character is typed, a
-.Dv TELNET IP
+.SM TELNET IP
sequence (see
-.Ic send
-.Ic ip
-above)
-is sent to the remote host.
-The initial value for the interrupt character is taken to be
-the terminal's
-.Ic intr
+.B send ip
+above) is sent to the remote host. The initial value for the interrupt
+character is taken to be the terminal's
+.B intr
character.
-.It Ic kill
+.TP
+.B kill
If
-.Nm telnet
+.B telnet
is in
-.Ic localchars
+.B localchars
mode (see
-.Ic toggle
-.Ic localchars
+.B toggle localchars
below),
-.Ic and
+.I and
if
-.Nm telnet
-is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
-character is typed, a
-.Dv TELNET EL
+.B telnet
+is operating in ``character at a time'' mode, then when this character
+is typed, a
+.SM TELNET EL
sequence (see
-.Ic send
-.Ic el
-above)
-is sent to the remote system.
-The initial value for the kill character is taken to be
-the terminal's
-.Ic kill
+.B send el
+above) is sent to the remote system. The initial value for the kill
+character is taken to be the terminal's
+.B kill
character.
-.It Ic lnext
+.TP
+.B lnext
If
-.Nm telnet
+.B telnet
is operating in
-.Dv LINEMODE
-or \*(Lqold line by line\*(Lq mode, then this character is taken to
-be the terminal's
-.Ic lnext
+.SM LINEMODE
+or ``old line by line'' mode, then this character is taken to be the
+terminal's
+.B lnext
+character. The initial value for the lnext character is taken to be the
+terminal's
+.B lnext
character.
-The initial value for the lnext character is taken to be
-the terminal's
-.Ic lnext
-character.
-.It Ic quit
+.TP
+.B quit
If
-.Nm telnet
+.B telnet
is in
-.Ic localchars
+.B localchars
mode (see
-.Ic toggle
-.Ic localchars
-below)
-and the
-.Ic quit
+.B toggle localchars
+below) and the
+.B quit
character is typed, a
-.Dv TELNET BRK
+.SM TELNET BRK
sequence (see
-.Ic send
-.Ic brk
-above)
-is sent to the remote host.
-The initial value for the quit character is taken to be
-the terminal's
-.Ic quit
+.B send brk
+above) is sent to the remote host. The initial value for the quit
+character is taken to be the terminal's
+.B quit
character.
-.It Ic reprint
+.TP
+.B reprint
If
-.Nm telnet
+.B telnet
is operating in
-.Dv LINEMODE
-or \*(Lqold line by line\*(Lq 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
+.SM LINEMODE
+or ``old line by line'' mode, then this character is taken to be the
+terminal's
+.B reprint
+character. The initial value for the reprint character is taken to be
the terminal's
-.Ic reprint
+.B reprint
character.
-.It Ic rlogin
-This is the rlogin escape character.
-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
-suspends the telnet command. The initial state is to
-disable the rlogin escape character.
-.It Ic start
+.TP
+.B rlogin
+This is the rlogin escape character. If set, the normal
+.B 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
+suspends the telnet command. The initial state is to disable the rlogin
+escape character.
+.TP
+.B start
If the
-.Dv TELNET TOGGLE-FLOW-CONTROL
-option has been enabled,
-then this character is taken to
-be the terminal's
-.Ic start
+.SM TELNET TOGGLE-FLOW-CONTROL
+option has been enabled, then this character is taken to be the
+terminal's
+.B start
+character. The initial value for the kill character is taken to be the
+terminal's
+.B start
character.
-The initial value for the kill character is taken to be
-the terminal's
-.Ic start
-character.
-.It Ic stop
+.TP
+.B stop
If the
-.Dv TELNET TOGGLE-FLOW-CONTROL
-option has been enabled,
-then this character is taken to
-be the terminal's
-.Ic stop
-character.
-The initial value for the kill character is taken to be
-the terminal's
-.Ic stop
+.SM TELNET TOGGLE-FLOW-CONTROL
+option has been enabled, then this character is taken to be the
+terminal's
+.B stop
+character. The initial value for the kill character is taken to be the
+terminal's
+.B stop
character.
-.It Ic susp
+.TP
+.B susp
If
-.Nm telnet
+.B telnet
is in
-.Ic localchars
+.B localchars
mode, or
-.Dv LINEMODE
+.SM LINEMODE
is enabled, and the
-.Ic suspend
+.B suspend
character is typed, a
-.Dv TELNET SUSP
+.SM TELNET SUSP
sequence (see
-.Ic send
-.Ic susp
-above)
-is sent to the remote host.
-The initial value for the suspend character is taken to be
-the terminal's
-.Ic suspend
+.B send susp
+above) is sent to the remote host. The initial value for the suspend
+character is taken to be the terminal's
+.B suspend
character.
-.It Ic tracefile
+.TP
+.B tracefile
This is the file to which the output, caused by
-.Ic netdata
+.B netdata
or
-.Ic option
+.B option
tracing being
-.Dv TRUE ,
-will be written. If it is set to
-.Dq Fl ,
-then tracing information will be written to standard output (the default).
-.It Ic worderase
+.SM TRUE,
+will be written. If it is set to ``\fB\-\fP'', then tracing information
+will be written to standard output (the default).
+.TP
+.B worderase
If
-.Nm telnet
+.B telnet
is operating in
-.Dv LINEMODE
-or \*(Lqold line by line\*(Lq 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
+.SM LINEMODE
+or ``old line by line'' mode, then this character is taken to be the
+terminal's
+.B worderase
+character. The initial value for the worderase character is taken to be
the terminal's
-.Ic worderase
+.B worderase
character.
-.It Ic \&?
-Displays the legal
-.Ic set
-.Pq Ic unset
-commands.
-.El
-.It Ic slc Ar state
+.TP
+.B \&?
+Displays the legal \fBset\fP (\fBunset\fP) commands.
+.RE
+.TP
+\fBslc\fP \fIstate\fP
The
-.Ic slc
-command (Set Local Characters) is used to set
-or change the state of the the special
-characters when the
-.Dv TELNET LINEMODE
-option has
-been enabled. Special characters are characters that get
-mapped to
-.Tn TELNET
+.B slc
+command (Set Local Characters) is used to set or change the state of the
+the special characters when the
+.SM TELNET LINEMODE
+option has been enabled. Special characters are characters that get
+mapped to
+.B telnet
commands sequences (like
-.Ic ip
+.B ip
or
-.Ic quit )
+.B quit )
or line editing characters (like
-.Ic erase
+.B erase
and
-.Ic kill ) .
+.BR kill ).
By default, the local special characters are exported.
-.Bl -tag -width Fl
-.It Ic check
-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 discrepancies with
-the local side, the local side will switch to the remote value.
-.It Ic export
-Switch to the local defaults for the special characters. The
-local default characters are those of the local terminal at
-the time when
-.Nm telnet
+.RS
+.TP
+.B check
+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 discrepancies with the local side, the
+local side will switch to the remote value.
+.TP
+.B export
+Switch to the local defaults for the special characters. The local
+default characters are those of the local terminal at the time when
+.B telnet
was started.
-.It Ic import
-Switch to the remote defaults for the special characters.
-The remote default characters are those of the remote system
-at the time when the
-.Tn TELNET
+.TP
+.B import
+Switch to the remote defaults for the special characters. The remote
+default characters are those of the remote system at the time when the
+.SM TELNET
connection was established.
-.It Ic \&?
+.TP
+.B \&?
Prints out help information for the
-.Ic slc
+.B slc
command.
-.El
-.It Ic status
+.RE
+.TP
+.B status
Show the current status of
-.Nm telnet .
-This includes the peer one is connected to, as well
-as the current mode.
-.It Ic toggle Ar arguments ...
+.BR telnet .
+This includes the peer one is connected to, as well as the current mode.
+.TP
+\fBtoggle\fP \fIarguments ...\fP
Toggle (between
-.Dv TRUE
+.SM TRUE
and
-.Dv FALSE )
+.SM FALSE)
various flags that control how
-.Nm telnet
-responds to events.
-These flags may be set explicitly to
-.Dv TRUE
+.B telnet
+responds to events. These flags may be set explicitly to
+.SM TRUE
or
-.Dv FALSE
+.SM FALSE
using the
-.Ic set
+.B set
and
-.Ic unset
-commands listed above.
-More than one argument may be specified.
-The state of these flags may be interrogated with the
-.Ic display
-command.
-Valid arguments are:
-.Bl -tag -width Ar
-.It Ic authdebug
+.B unset
+commands listed above. More than one argument may be specified. The
+state of these flags may be interrogated with the
+.B display
+command. Valid arguments are:
+.RS
+.TP
+.B authdebug
Turns on debugging information for the authentication code.
-.It Ic autoflush
+.TP
+.B autoflush
If
-.Ic autoflush
+.B autoflush
and
-.Ic localchars
+.B localchars
are both
-.Dv TRUE ,
+.SM TRUE ,
then when the
-.Ic ao ,
+.BR ao ,
or
-.Ic quit
+.B quit
characters are recognized (and transformed into
-.Tn TELNET
+.SM TELNET
sequences; see
-.Ic set
+.B set
above for details),
-.Nm telnet
-refuses to display any data on the user's terminal
-until the remote system acknowledges (via a
-.Dv TELNET TIMING MARK
-option)
-that it has processed those
-.Tn TELNET
-sequences.
-The initial value for this toggle is
-.Dv TRUE
-if the terminal user had not
-done an "stty noflsh", otherwise
-.Dv FALSE
+.B telnet
+refuses to display any data on the user's terminal until the remote
+system acknowledges (via a
+.SM TELNET TIMING MARK
+option) that it has processed those
+.SM TELNET
+sequences. The initial value for this toggle is
+.SM TRUE
+if the terminal user had not done an "stty noflsh", otherwise
+.SM FALSE
(see
-.Xr stty 1 ) .
-.It Ic autodecrypt
+.BR stty (1).
+.TP
+.B autodecrypt
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
-output (input) stream should be enabled as soon as
-possible.
-.Pp
+.SM 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 output (input)
+stream should be enabled as soon as possible.
+.PP
Note: Because of export controls, the
-.Dv TELNET ENCRYPT
+.SM TELNET ENCRYPT
option is not supported outside the United States and Canada.
-.It Ic autologin
+.TP
+.B autologin
If the remote side supports the
-.Dv TELNET AUTHENTICATION
+.SM TELNET AUTHENTICATION
option
-.Tn TELNET
+.B telnet
attempts to use it to perform automatic authentication. If the
-.Dv AUTHENTICATION
-option is not supported, the user's login
-name are propagated through the
-.Dv TELNET ENVIRON
-option.
-This command is the same as specifying
-.Ar a
+.SM AUTHENTICATION
+option is not supported, the user's login name are propagated through
+the
+.SM TELNET ENVIRON
+option. This command is the same as specifying the
+.B \-a
option on the
-.Ic open
+.B open
command.
-.It Ic autosynch
+.TP
+.B autosynch
If
-.Ic autosynch
+.B autosynch
and
-.Ic localchars
+.B localchars
are both
-.Dv TRUE ,
+.SM TRUE,
then when either the
-.Ic intr
+.B intr
or
-.Ic quit
+.B quit
characters is typed (see
-.Ic set
+.B set
above for descriptions of the
-.Ic intr
+.B intr
and
-.Ic quit
+.B quit
characters), the resulting
-.Tn TELNET
+.SM TELNET
sequence sent is followed by the
-.Dv TELNET SYNCH
-sequence.
-This procedure
-.Ic should
-cause the remote system to begin throwing away all previously
-typed input until both of the
-.Tn TELNET
-sequences have been read and acted upon.
-The initial value of this toggle is
-.Dv FALSE .
-.It Ic binary
+.SM TELNET SYNCH
+sequence. This procedure
+.I should
+cause the remote system to begin throwing away all previously typed
+input until both of the
+.SM TELNET
+sequences have been read and acted upon. The initial value of this
+toggle is
+.SM FALSE.
+.TP
+.B binary
Enable or disable the
-.Dv TELNET BINARY
+.SM TELNET BINARY
option on both input and output.
-.It Ic inbinary
+.TP
+.B inbinary
Enable or disable the
-.Dv TELNET BINARY
+.SM TELNET BINARY
option on input.
-.It Ic outbinary
+.TP
+.B outbinary
Enable or disable the
-.Dv TELNET BINARY
+.SM TELNET BINARY
option on output.
-.It Ic crlf
-If this is
-.Dv TRUE ,
-then carriage returns will be sent as
-.Li <CR><LF> .
+.TP
+.B crlf
If this is
-.Dv FALSE ,
-then carriage returns will be send as
-.Li <CR><NUL> .
-The initial value for this toggle is
-.Dv FALSE .
-.It Ic crmod
-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
-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.
+.SM TRUE,
+then carriage returns will be sent as <CR><LF>. If this is
+.SM FALSE,
+then carriage returns will be send as <CR><NUL>. The initial value for
+this toggle is
+.SM FALSE.
+.TP
+.B crmod
+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 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. The initial value for this toggle
+is
+.SM FALSE .
+.TP
+.B debug
+Toggles socket level debugging (useful only to the \fBsuper user\fP).
The initial value for this toggle is
-.Dv FALSE .
-.It Ic debug
-Toggles socket level debugging (useful only to the
-.Ic super user ) .
-The initial value for this toggle is
-.Dv FALSE .
-.It Ic encdebug
+.SM FALSE .
+.TP
+.B encdebug
Turns on debugging information for the encryption code.
-.It Ic localchars
+.TP
+.B localchars
If this is
-.Dv TRUE ,
+.SM TRUE ,
then the
-.Ic flush ,
-.Ic interrupt ,
-.Ic quit ,
-.Ic erase ,
+.BR flush ,
+.BR interrupt ,
+.BR quit ,
+.BR erase ,
and
-.Ic kill
+.B kill
characters (see
-.Ic set
-above) are recognized locally, and transformed into (hopefully) appropriate
-.Tn TELNET
-control sequences
-(respectively
-.Ic ao ,
-.Ic ip ,
-.Ic brk ,
-.Ic ec ,
+.B set
+above) are recognized locally, and transformed into (hopefully)
+appropriate
+.SM TELNET
+control sequences (respectively
+.BR ao ,
+.BR ip ,
+.BR brk ,
+.BR ec ,
and
-.Ic el ;
+.BR el ;
see
-.Ic send
-above).
-The initial value for this toggle is
-.Dv TRUE
-in \*(Lqold line by line\*(Rq mode,
-and
-.Dv FALSE
-in \*(Lqcharacter at a time\*(Rq mode.
-When the
-.Dv LINEMODE
+.B send
+above). The initial value for this toggle is
+.SM TRUE
+in ``old line by line'' mode, and
+.SM FALSE
+in ``character at a time'' mode. When the
+.SM LINEMODE
option is enabled, the value of
-.Ic localchars
+.B localchars
is ignored, and assumed to always be
-.Dv TRUE .
+.SM TRUE.
If
-.Dv LINEMODE
+.SM LINEMODE
has ever been enabled, then
-.Ic quit
+.B quit
is sent as
-.Ic abort ,
+.BR abort ,
+and
+.B eof
and
-.Ic eof and
.B suspend
are sent as
-.Ic eof and
-.Ic susp ,
+.B eof
+and
+.BR susp ,
see
-.Ic send
+.B send
above).
-.It Ic netdata
-Toggles the display of all network data (in hexadecimal format).
-The initial value for this toggle is
-.Dv FALSE .
-.It Ic options
+.TP
+.B netdata
+Toggles the display of all network data (in hexadecimal format). The
+initial value for this toggle is
+.SM FALSE.
+.TP
+.B options
Toggles the display of some internal
-.Nm telnet
+.B telnet
protocol processing (having to do with
-.Tn TELNET
-options).
-The initial value for this toggle is
-.Dv FALSE .
-.It Ic prettydump
+.SM TELNET
+options). The initial value for this flag is
+.SM FALSE .
+.TP
+.B prettydump
When the
-.Ic netdata
-toggle is enabled, if
-.Ic prettydump
+.B netdata
+flag is enabled, if
+.B prettydump
is enabled the output from the
-.Ic netdata
-command will be formatted in a more user readable format.
-Spaces are put between each character in the output, and the
-beginning of any
-.Tn TELNET
+.B netdata
+command will be formatted in a more user-readable format. Spaces are
+put between each character in the output, and the beginning of any
+.SM TELNET
escape sequence is preceded by a '*' to aid in locating them.
-.It Ic skiprc
-When the skiprc toggle is
-.Dv TRUE ,
-.Tn TELNET
-skips the reading of the
-.Pa \&.telnetrc
-file in the users home
-directory when connections are opened. The initial
-value for this toggle is
-.Dv FALSE.
-.It Ic termdata
-Toggles the display of all terminal data (in hexadecimal format).
-The initial value for this toggle is
-.Dv FALSE .
-.It Ic verbose_encrypt
+.TP
+.B skiprc
+When the skiprc flag is
+.SM TRUE,
+.SM TELNET
+skips the reading of the \&.telnetrc file in the user's home directory
+when connections are opened. The initial value for this flag is
+.SM FALSE.
+.TP
+.B termdata
+Toggles the display of all terminal data (in hexadecimal format). The
+initial value for this flag is
+.SM FALSE.
+.TP
+.B verbose_encrypt
When the
-.Ic verbose_encrypt
-toggle is
-.Dv TRUE ,
-.Tn TELNET
-prints out a message each time encryption is enabled or
-disabled. The initial value for this toggle is
-.Dv FALSE.
-Note: Because of export controls, data encryption
-is not supported outside of the United States and Canada.
-.It Ic \&?
+.B verbose_encrypt
+flag is
+.SM TRUE,
+.SM TELNET
+prints out a message each time encryption is enabled or disabled. The
+initial value for this toggle is
+.SM FALSE.
+Note: Because of export controls, data encryption is not supported
+outside of the United States and Canada.
+.TP
+.B \&?
Displays the legal
-.Ic toggle
+.B toggle
commands.
-.El
-.It Ic z
+.RE
+.TP
+.B z
Suspend
-.Nm telnet .
-This command only works when the user is using the
-.Xr csh 1 .
-.It Ic \&! Op Ar command
-Execute a single command in a subshell on the local
-system. If
-.Ic command
-is omitted, then an interactive
-subshell is invoked.
-.It Ic \&? Op Ar command
+.BR telnet .
+This command only works when the user's shell is
+.IR csh (1).
+.TP
+\fB\&!\fP [\fIcommand\fP]
+Execute a single command in a subshell on the local system. If
+.B command
+is omitted, then an interactive subshell is invoked.
+.TP
+\fB\&?\fP \fIcommand\fP
Get help. With no arguments,
-.Nm telnet
-prints a help summary.
-If a command is specified,
-.Nm telnet
+.b telnet
+prints a help summary. If a command is specified,
+.b telnet
will print the help information for just that command.
-.El
-.Sh ENVIRONMENT
-.Nm Telnet
+.SH ENVIRONMENT
+.B Telnet
uses at least the
-.Ev HOME ,
-.Ev SHELL ,
-.Ev DISPLAY ,
+.SM HOME,
+.SM SHELL,
+.SM DISPLAY,
and
-.Ev TERM
-environment variables.
-Other environment variables may be propagated
-to the other side via the
-.Dv TELNET ENVIRON
+.SM TERM
+environment variables. Other environment variables may be propagated to
+the other side via the
+.SM TELNET ENVIRON
option.
-.Sh FILES
-.Bl -tag -width ~/.telnetrc -compact
-.It Pa ~/.telnetrc
-user customized telnet startup values
-.El
-.Sh HISTORY
+.SH CONFIGURATION
+The following defaults may be specified in the [appdefaults] or [realms]
+section of the
+.IR krb5.conf (5)
+file:
+.TP "\w'.B forwardable\ \ 'u"
+.B forward
+Whether or not to forward tickets to the remote host. Takes a boolean
+argument.
+.TP
+.B forwardable
+Whether or not any forwarded tickets should be forwardable. Takes a
+boolean argument.
+.TP
+.B encrypt
+Whether or not to encrypt the data stream. Takes a boolean argument.
+.TP
+.B autologin
+Whether or not to attempt automatic login. Takes a boolean argument.
+.PP
+For example:
+.sp
+.nf
+.in +1i
+[appdefaults]
+ telnet = {
+ forwardable = true
+ forward = true
+ encrypt = true
+ autologin = true
+ }
+[realms]
+ FUBAR.ORG = {
+ telnet = {
+ forward = false
+ }
+ }
+.in -1i
+.fi
+.sp
+.SH FILES
+.TP "\w'/etc/krb5.conf\ \ 'u"
+/etc/krb5.conf
+file containing local host's Kerberos V5 configuration information
+.sp -1v
+.TP
+~/.telnetrc
+user-customized telnet startup values
+.sp -1v
+.TP
+~/.k5login
+(on remote host) - file containing Kerberos principals that are allowed
+access.
+.SH HISTORY
The
-.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.
-.Pp
-In \*(Lqold line by line\*(Rq mode or
-.Dv LINEMODE
+.B Telnet
+command appeared in 4.2BSD.
+.SH NOTES
+.PP
+On some remote systems, echo has to be turned off manually when in ``old
+line by line'' mode.
+.PP
+In ``old line by line'' mode or
+.SM LINEMODE
the terminal's
-.Ic eof
-character is only recognized (and sent to the remote system)
-when it is the first character on a line.
+.B eof
+character is only recognized (and sent to the remote system) when it is
+the first character on a line.
.\" SUCH DAMAGE.
.\"
.\" @(#)telnetd.8 8.2 (Berkeley) 2/3/94
-.\"
-.so man1/tmac.doc
-.Dd February 3, 1994
-.Dt TELNETD 8
-.Os BSD 4.2
-.Sh NAME
-.Nm telnetd
-.Nd DARPA
-.Tn TELNET
+.\" "
+.so man1/header.doc
+.TH TELNETD 8 \*h
+.SH NAME
+telnetd \-
+.SM DARPA TELNET
protocol server
-.Sh SYNOPSIS
-.Nm /usr/libexec/telnetd
-.Op Fl a Ar authmode
-.Op Fl B
-.Op Fl D Ar debugmode
-.Op Fl edebug
-.Op Fl h
-.Op Fl I Ns Ar initid
-.Op Fl l
-.Op Fl k
-.Op Fl n
-.Op Fl r Ns Ar lowpty-highpty
-.Op Fl s
-.Op Fl S Ar tos
-.Op Fl u Ar len
-.Op Fl U
-.Op Fl X Ar authtype
-.Op Fl debug Op Ar port
+.SH SYNOPSIS
+.B /usr/libexec/telnetd
+[\fB\-a\fP \fIauthmode\fP] [\fB\-B\fP] [\fB\-D\fP] [\fIdebugmode\fP]
+[\fB\-edebug\fP] [\fB\-h\fP] [\fB\-I\fP\fIinitid\fP] [\fB\-l\fP]
+[\fB\-k\fP] [\fB\-n\fP] [\fB\-r\fP\fIlowpty-highpty\fP] [\fB\-s\fP]
+[\fB\-S\fP \fItos\fP] [\fB\-U\fP] [\fB\-X\fP \fIauthtype\fP]
+[\fB\-debug\fP [\fIport\fP]]
.Sh DESCRIPTION
The
-.Nm telnetd
+.B telnetd
command is a server which supports the
-.Tn DARPA
+.SM DARPA
standard
-.Tn TELNET
+.SM TELNET
virtual terminal protocol.
-.Nm Telnetd
+.B Telnetd
is normally invoked by the internet server (see
-.Xr inetd 8 )
+.BR inetd (8)
for requests to connect to the
-.Tn TELNET
+.SM TELNET
port as indicated by the
-.Pa /etc/services
+.I /etc/services
file (see
-.Xr services 5 ) .
+.BR services (5)).
The
-.Fl debug
+.B \-debug
option may be used to start up
-.Nm telnetd
+.B telnetd
manually, instead of through
-.Xr inetd 8 .
+.IR inetd (8).
If started up this way,
-.Ar port
+.I port
may be specified to run
-.Nm telnetd
+.B telnetd
on an alternate
-.Tn TCP
+.SM TCP
port number.
-.Pp
+.PP
The
-.Nm telnetd
+.B telnetd
command accepts the following options:
-.Bl -tag -width "-a authmode"
-.It Fl a Ar authmode
-This option may be used for specifying what mode should
-be used for authentication.
-Note that this option is only useful if
-.Nm telnetd
+.TP
+\fB\-a\fP \fIauthmode\fP
+This option may be used for specifying what mode should be used for
+authentication. Note that this option is only useful if
+.B telnetd
has been compiled with support for the
-.Dv AUTHENTICATION
-option.
-There are several valid values for
-.Ar authmode:
-.Bl -tag -width debug
-.It debug
+.SM AUTHENTICATION
+option. There are several valid values for
+.IR authmode :
+.RS
+.TP
+.B debug
Turns on authentication debugging code.
-.It user
-Only allow connections when the remote user
-can provide valid authentication information
-to identify the remote user,
-and is allowed access to the specified account
-without providing a password.
-.It valid
-Only allow connections when the remote user
-can provide valid authentication information
-to identify the remote user.
-The
-.Xr login 1
-command will provide any additional user verification
-needed if the remote user is not allowed automatic
-access to the specified account.
-.It other
+.TP
+.B user
+Only allow connections when the remote user can provide valid
+authentication information to identify the remote user, and is allowed
+access to the specified account without providing a password.
+.TP
+.B valid
+Only allow connections when the remote user can provide valid
+authentication information to identify the remote user. The
+.IR login (1)
+command will provide any additional user verification needed if the
+remote user is not allowed automatic access to the specified account.
+.TP
+.B other
Only allow connections that supply some authentication information.
-This option is currently not supported
-by any of the existing authentication mechanisms,
-and is thus the same as specifying
-.Fl a
-.Cm valid .
-.It none
-This is the default state.
-Authentication information is not required.
-If no or insufficient authentication information
-is provided, then the
-.Xr login 1
-program will provide the necessary user
-verification.
-.It off
-This disables the authentication code.
-All user verification will happen through the
-.Xr login 1
+This option is currently not supported by any of the existing
+authentication mechanisms, and is thus the same as specifying
+.B \-a
+.BR valid .
+.TP
+.B none
+This is the default state. Authentication information is not required.
+If no or insufficient authentication information is provided, then the
+.IR login (1)
+program will provide the necessary user verification.
+.TP
+.B off
+This disables the authentication code. All user verification will
+happen through the
+.IR login (1)
program.
-.El
-.It Fl B
+.RE
+.TP
+.B \-B
Specifies bftp server mode. In this mode,
-.Nm telnetd
+.B telnetd
causes login to start a
-.Xr bftp 1
-session rather than the user's
-normal shell. In bftp daemon mode normal
-logins are not supported, and it must be used
-on a port other than the normal
-.Tn TELNET
+.IR bftp (1)
+session rather than the user's normal shell. In bftp daemon mode,
+normal logins are not supported, and it must be used on a port other
+than the normal
+.SM TELNET
port.
-.It Fl D Ar debugmode
-This option may be used for debugging purposes.
-This allows
-.Nm telnetd
-to print out debugging information
-to the connection, allowing the user to see what
-.Nm telnetd
-is doing.
-There are several possible values for
-.Ar debugmode:
-.Bl -tag -width exercise
-.It Cm options
+.TP
+\fB\-D\fP \fIdebugmode\fP
+This option may be used for debugging purposes. This allows
+.B telnetd
+to print out debugging information to the connection, allowing the user
+to see what
+.B telnetd
+is doing. There are several possible values for
+.IR debugmode :
+.RS
+.TP
+.B options
Prints information about the negotiation of
-.Tn TELNET
+.SM TELNET
options.
-.It Cm report
-Prints the
-.Cm options
-information, plus some additional information
-about what processing is going on.
-.It Cm netdata
+.TP
+.B report
+Prints the
+.B options
+information, plus some additional information about what processing is
+going on.
+.TP
+.B netdata
Displays the data stream received by
-.Nm telnetd.
-.It Cm ptydata
+.B telnetd.
+.TP
+.B ptydata
Displays data written to the pty.
-.It Cm exercise
+.TP
+.B exercise
Has not been implemented yet.
-.El
-.It Fl debug
+.RE
+.TP
+.B \-debug
Enables debugging on each socket created by
-.Nm telnetd
+.B telnetd
(see
-.Dv SO_DEBUG
+.SM SO_DEBUG
in
-.Xr socket 2 ) .
-.It Fl edebug
+.IR socket (2)).
+.TP
+.B \-edebug
If
-.Nm telnetd
+.B telnetd
has been compiled with support for data encryption, then the
-.Fl edebug
+.B edebug
option may be used to enable encryption debugging code.
-.It Fl h
-Disables the printing of host-specific information before
-login has been completed.
-.It Fl I Ar initid
+.TP
+.B \-h
+Disables the printing of host-specific information before login has been
+completed.
+.TP
+\fB\-I\fP \fIinitid\fP
This option is only applicable to
-.Tn UNICOS
-systems prior to 7.0.
-It specifies the
-.Dv ID
+.SM UNICOS
+systems prior to 7.0. It specifies the
+.SM ID
from
-.Pa /etc/inittab
+.I /etc/inittab
to use when init starts login sessions. The default
-.Dv ID
-is
-.Dv fe.
-.It Fl k
+.SM ID
+is fe.
+.TP
+.B \-k
This option is only useful if
-.Nm telnetd
-has been compiled with both linemode and kludge linemode
-support. If the
-.Fl k
-option is specified, then if the remote client does not
-support the
-.Dv LINEMODE
+.B telnetd
+has been compiled with both linemode and kludge linemode support. If
+the
+.B \-k
+option is specified, then if the remote client does not support the
+.SM LINEMODE
option, then
-.Nm telnetd
-will operate in character at a time mode.
-It will still support kludge linemode, but will only
-go into kludge linemode if the remote client requests
-it.
-(This is done by by the client sending
-.Dv DONT SUPPRESS-GO-AHEAD
+.B telnetd
+will operate in character at a time mode. It will still support kludge
+linemode, but will only go into kludge linemode if the remote client
+requests it. (This is done by by the client sending
+.SM DONT SUPPRESS-GO-AHEAD
and
-.Dv DONT ECHO . )
+.SM DONT ECHO.)
The
-.Fl k
-option is most useful when there are remote clients
-that do not support kludge linemode, but pass the heuristic
-(if they respond with
-.Dv WILL TIMING-MARK
+.B \-k
+option is most useful when there are remote clients that do not support
+kludge linemode, but pass the heuristic (if they respond with
+.SM WILL TIMING-MARK
in response to a
-.Dv DO TIMING-MARK)
+.SM DO TIMING-MARK)
for kludge linemode support.
-.It Fl l
-Specifies line mode. Tries to force clients to use line-
-at-a-time mode.
-If the
-.Dv LINEMODE
-option is not supported, it will go
-into kludge linemode.
-.It Fl n
+.TP
+.B \-l
+Specifies line mode. Tries to force clients to use line-at-a-time
+mode. If the
+.SM LINEMODE
+option is not supported, it will go into kludge linemode.
+.TP
+.B \-n
Disable
-.Dv TCP
+.SM TCP
keep-alives. Normally
-.Nm telnetd
+.B telnetd
enables the
-.Tn TCP
-keep-alive mechanism to probe connections that
-have been idle for some period of time to determine
-if the client is still there, so that idle connections
-from machines that have crashed or can no longer
-be reached may be cleaned up.
-.It Fl r Ar lowpty-highpty
+.SM TCP
+keep-alive mechanism to probe connections that have been idle for some
+period of time to determine if the client is still there, so that idle
+connections from machines that have crashed or can no longer be reached
+may be cleaned up.
+.TP
+\fB\-r\fP \fIlowpty-highpty\fP
This option is only enabled when
-.Nm telnetd
+.B telnetd
is compiled for
-.Dv UNICOS.
-It specifies an inclusive range of pseudo-terminal devices to
-use. If the system has sysconf variable
-.Dv _SC_CRAY_NPTY
+.SM UNICOS.
+It specifies an inclusive range of pseudo-terminal devices to use. If
+the system has sysconf variable
+.SM _SC_CRAY_NPTY
configured, the default pty search range is 0 to
-.Dv _SC_CRAY_NPTY;
+.SM _SC_CRAY_NPTY;
otherwise, the default range is 0 to 128. Either
-.Ar lowpty
+.I lowpty
or
-.Ar highpty
-may be omitted to allow changing
-either end of the search range. If
-.Ar lowpty
+.I highpty
+may be omitted to allow changing either end of the search range. If
+.I lowpty
is omitted, the - character is still required so that
-.Nm telnetd
+.B telnetd
can differentiate
-.Ar highpty
+.I highpty
from
-.Ar lowpty .
-.It Fl s
+.IR lowpty .
+.TP
+.B \-s
This option is only enabled if
-.Nm telnetd
-is compiled with support for
-.Tn SecurID
-cards.
-It causes the
-.Fl s
+.B telnetd
+is compiled with support for SecurID cards. It causes the
+.B \-s
option to be passed on to
-.Xr login 1 ,
+.IR login (1),
and thus is only useful if
-.Xr login 1
+.IR login (1)
supports the
-.Fl s
-flag to indicate that only
-.Tn SecurID
-validated logins are allowed, and is
-usually useful for controlling remote logins
-from outside of a firewall.
-.It Fl S Ar tos
-.It Fl U
+.B \-s
+flag to indicate that only SecurID validated logins are allowed, and is
+usually useful for controlling remote logins from outside of a firewall.
+.TP
+\fB\-S\fP \fItos\fP
+.TP
+.B \-U
This option causes
-.Nm telnetd
-to refuse connections from addresses that
-cannot be mapped back into a symbolic name
-via the
-.Xr gethostbyaddr 3
+.B telnetd
+to refuse connections from addresses that cannot be mapped back into a
+symbolic name via the
+.IR gethostbyaddr (3)
routine.
-.It Fl X Ar authtype
+.TP
+\fB\-X\fP \fIauthtype\fP
This option is only valid if
-.Nm telnetd
-has been built with support for the authentication option.
-It disables the use of
-.Ar authtype
-authentication, and
-can be used to temporarily disable
-a specific authentication type without having to recompile
-.Nm telnetd .
-.El
-.Pp
-.Nm Telnetd
+.B telnetd
+has been built with support for the authentication option. It disables
+the use of
+.I authtype
+authentication, and can be used to temporarily disable a specific
+authentication type without having to recompile
+.BR telnetd .
+.PP
+.B Telnetd
operates by allocating a pseudo-terminal device (see
-.Xr pty 4 )
-for a client, then creating a login process which has
-the slave side of the pseudo-terminal as
-.Dv stdin ,
-.Dv stdout
+.IR pty (4))
+for a client, then creating a login process which has the slave side of
+the pseudo-terminal as
+.IR stdin ,
+.I stdout
and
-.Dv stderr .
-.Nm Telnetd
-manipulates the master side of the pseudo-terminal,
-implementing the
-.Tn TELNET
-protocol and passing characters
-between the remote client and the login process.
-.Pp
+.IR stderr .
+.B Telnetd
+manipulates the master side of the pseudo-terminal, implementing the
+.SM TELNET
+protocol and passing characters between the remote client and the login
+process.
+.PP
When a
-.Tn TELNET
+.SM TELNET
session is started up,
-.Nm telnetd
+.B telnetd
sends
-.Tn TELNET
-options to the client side indicating
-a willingness to do the
-following
-.Tn TELNET
+.SM TELNET
+options to the client side indicating a willingness to do the following
+.SM TELNET
options, which are described in more detail below:
-.Bd -literal -offset indent
+.sp
+.nf
+.in +0.5i
DO AUTHENTICATION
WILL ENCRYPT
DO TERMINAL TYPE
WILL STATUS
DO LFLOW
DO TIMING-MARK
-.Ed
-.Pp
+.in
+.fi
+.PP
The pseudo-terminal allocated to the client is configured
to operate in \*(lqcooked\*(rq mode, and with
-.Dv XTABS and
-.Dv CRMOD
+.SM XTABS
+and
+.SM CRMOD
enabled (see
-.Xr tty 4 ) .
-.Pp
-.Nm Telnetd
+.IR tty (4)).
+.PP
+.B Telnetd
has support for enabling locally the following
-.Tn TELNET
+.SM TELNET
options:
-.Bl -tag -width "DO AUTHENTICATION"
-.It "WILL ECHO"
+.TP "\w'.SM WILL TIMING-MARK\ 'u"
+.SM WILL ECHO
When the
-.Dv LINEMODE
+.SM LINEMODE
option is enabled, a
-.Dv WILL ECHO
+.SM WILL ECHO
or
-.Dv WONT ECHO
-will be sent to the client to indicate the
-current state of terminal echoing.
-When terminal echo is not desired, a
-.Dv WILL ECHO
+.SM WONT ECHO
+will be sent to the client to indicate the current state of terminal
+echoing. When terminal echo is not desired, a
+.SM WILL ECHO
is sent to indicate that
-.Tn telnetd
-will take care of echoing any data that needs to be
-echoed to the terminal, and then nothing is echoed.
-When terminal echo is desired, a
-.Dv WONT ECHO
+.B telnetd
+will take care of echoing any data that needs to be echoed to the
+terminal, and then nothing is echoed. When terminal echo is desired, a
+.SM WONT ECHO
is sent to indicate that
-.Tn telnetd
+.B telnetd
will not be doing any terminal echoing, so the
client should do any terminal echoing that is needed.
-.It "WILL BINARY"
-Indicates that the client is willing to send a
-8 bits of data, rather than the normal 7 bits
-of the Network Virtual Terminal.
-.It "WILL SGA"
+.TP
+.SM WILL BINARY
+Indicates that the client is willing to send a 8 bits of data, rather
+than the normal 7 bits of the Network Virtual Terminal.
+.TP
+.SM WILL SGA
Indicates that it will not be sending
-.Dv IAC GA,
+.SM IAC GA,
go ahead, commands.
-.It "WILL STATUS"
-Indicates a willingness to send the client, upon
-request, of the current status of all
-.Tn TELNET
+.TP
+.SM WILL STATUS
+Indicates a willingness to send the client, upon request, of the current
+status of all
+.SM TELNET
options.
-.It "WILL TIMING-MARK"
+.TP
+.SM WILL TIMING-MARK
Whenever a
-.Dv DO TIMING-MARK
-command is received, it is always responded
-to with a
-.Dv WILL TIMING-MARK
-.It "WILL LOGOUT"
+.SM DO TIMING-MARK
+command is received, it is always responded to with a
+.SM WILL TIMING-MARK
+.TP
+.SM WILL LOGOUT
When a
-.Dv DO LOGOUT
+.SM DO LOGOUT
is received, a
-.Dv WILL LOGOUT
+.SM WILL LOGOUT
is sent in response, and the
-.Tn TELNET
+.SM TELNET
session is shut down.
-.It "WILL ENCRYPT"
+.TP
+.SM WILL ENCRYPT
Only sent if
-.Nm telnetd
-is compiled with support for data encryption, and
-indicates a willingness to decrypt
-the data stream.
-.El
-.Pp
-.Nm Telnetd
+.B telnetd
+is compiled with support for data encryption, and indicates a
+willingness to decrypt the data stream.
+.PP
+.B Telnetd
has support for enabling remotely the following
-.Tn TELNET
+.SM TELNET
options:
-.Bl -tag -width "DO AUTHENTICATION"
-.It "DO BINARY"
+.TP "\w'.SM DO TERMINAL-SPEED\ 'u"
+.SM DO BINARY
Sent to indicate that
-.Tn telnetd
+.B telnetd
is willing to receive an 8 bit data stream.
-.It "DO LFLOW"
-Requests that the client handle flow control
-characters remotely.
-.It "DO ECHO"
+.TP
+.SM DO LFLOW
+Requests that the client handle flow control characters remotely.
+.TP
+.SM DO ECHO
This is not really supported, but is sent to identify a 4.2BSD
-.Xr telnet 1
+.IR telnet (1)
client, which will improperly respond with
-.Dv WILL ECHO.
+.SM WILL ECHO.
If a
-.Dv WILL ECHO
+.SM WILL ECHO
is received, a
-.Dv DONT ECHO
+.SM DONT ECHO
will be sent in response.
-.It "DO TERMINAL-TYPE"
-Indicates a desire to be able to request the
-name of the type of terminal that is attached
-to the client side of the connection.
-.It "DO SGA"
+.TP
+.SM DO TERMINAL-TYPE
+Indicates a desire to be able to request the name of the type of
+terminal that is attached to the client side of the connection.
+.TP
+.SM DO SGA
Indicates that it does not need to receive
-.Dv IAC GA,
+.SM IAC GA,
the go ahead command.
-.It "DO NAWS"
-Requests that the client inform the server when
-the window (display) size changes.
-.It "DO TERMINAL-SPEED"
-Indicates a desire to be able to request information
-about the speed of the serial line to which
-the client is attached.
-.It "DO XDISPLOC"
-Indicates a desire to be able to request the name
-of the X windows display that is associated with
-the telnet client.
-.It "DO NEW-ENVIRON"
-Indicates a desire to be able to request environment
-variable information, as described in RFC 1572.
-.It "DO ENVIRON"
-Indicates a desire to be able to request environment
-variable information, as described in RFC 1408.
-.It "DO LINEMODE"
+.TP
+.SM DO NAWS
+Requests that the client inform the server when the window (display)
+size changes.
+.TP
+.SM DO TERMINAL-SPEED
+Indicates a desire to be able to request information about the speed of
+the serial line to which the client is attached.
+.TP
+.SM DO XDISPLOC
+Indicates a desire to be able to request the name of the X windows
+display that is associated with the telnet client.
+.TP
+.SM DO NEW-ENVIRON
+Indicates a desire to be able to request environment variable
+information, as described in RFC 1572.
+.TP
+.SM DO ENVIRON
+Indicates a desire to be able to request environment variable
+information, as described in RFC 1408.
+.TP
+.SM DO LINEMODE
Only sent if
-.Nm telnetd
-is compiled with support for linemode, and
-requests that the client do line by line processing.
-.It "DO TIMING-MARK"
+.B telnetd
+is compiled with support for linemode, and requests that the client do
+line by line processing.
+.TP
+.SM DO TIMING-MARK
Only sent if
-.Nm telnetd
-is compiled with support for both linemode and
-kludge linemode, and the client responded with
-.Dv WONT LINEMODE.
+.B telnetd
+is compiled with support for both linemode and kludge linemode, and the
+client responded with
+.SM WONT LINEMODE.
If the client responds with
-.Dv WILL TM,
-the it is assumed that the client supports
-kludge linemode.
-Note that the
-.Op Fl k
+.SM WILL TM,
+the it is assumed that the client supports kludge linemode. Note that
+the
+.B \-k
option can be used to disable this.
-.It "DO AUTHENTICATION"
+.TP
+.SM DO AUTHENTICATION
Only sent if
-.Nm telnetd
-is compiled with support for authentication, and
-indicates a willingness to receive authentication
-information for automatic login.
-.It "DO ENCRYPT"
+.B telnetd
+is compiled with support for authentication, and indicates a willingness
+to receive authentication information for automatic login.
+.TP
+.SM DO ENCRYPT
Only sent if
-.Nm telnetd
-is compiled with support for data encryption, and
-indicates a willingness to decrypt
-the data stream.
-.Sh ENVIRONMENT
-.Sh FILES
-.Pa /etc/services
+.B telnetd
+is compiled with support for data encryption, and indicates a
+willingness to decrypt the data stream.
+.SH FILES
+.I /etc/services
.br
-.Pa /etc/inittab
+.I /etc/inittab
(UNICOS systems only)
.br
-.Pa /etc/iptos
+.I /etc/iptos
(if supported)
.br
-.Pa /usr/ucb/bftp
+.I /usr/ucb/bftp
(if supported)
-.Sh "SEE ALSO"
-.Xr telnet 1 ,
-.Xr login 1 ,
-.Xr bftp 1
+.SH "SEE ALSO"
+.IR telnet (1),
+.IR login (1),
+.IR bftp (1)
(if supported)
-.Sh STANDARDS
-.Bl -tag -compact -width RFC-1572
-.It Cm RFC-854
-.Tn TELNET
-PROTOCOL SPECIFICATION
-.It Cm RFC-855
+.SH STANDARDS
+.TP "\w'.B RFC-2000\ 'u"
+.B RFC-854
+TELNET PROTOCOL SPECIFICATION
+.sp -1
+.TP
+.B RFC-855
TELNET OPTION SPECIFICATIONS
-.It Cm RFC-856
+.sp -1
+.TP
+.B RFC-856
TELNET BINARY TRANSMISSION
-.It Cm RFC-857
+.sp -1
+.TP
+.B RFC-857
TELNET ECHO OPTION
-.It Cm RFC-858
+.sp -1
+.TP
+.B RFC-858
TELNET SUPPRESS GO AHEAD OPTION
-.It Cm RFC-859
+.sp -1
+.TP
+.B RFC-859
TELNET STATUS OPTION
-.It Cm RFC-860
+.sp -1
+.TP
+.B RFC-860
TELNET TIMING MARK OPTION
-.It Cm RFC-861
+.sp -1
+.TP
+.B RFC-861
TELNET EXTENDED OPTIONS - LIST OPTION
-.It Cm RFC-885
+.sp -1
+.TP
+.B RFC-885
TELNET END OF RECORD OPTION
-.It Cm RFC-1073
+.sp -1
+.TP
+.B RFC-1073
Telnet Window Size Option
-.It Cm RFC-1079
+.sp -1
+.TP
+.B RFC-1079
Telnet Terminal Speed Option
-.It Cm RFC-1091
+.sp -1
+.TP
+.B RFC-1091
Telnet Terminal-Type Option
-.It Cm RFC-1096
+.sp -1
+.TP
+.B RFC-1096
Telnet X Display Location Option
-.It Cm RFC-1123
+.sp -1
+.TP
+.B RFC-1123
Requirements for Internet Hosts -- Application and Support
-.It Cm RFC-1184
+.sp -1
+.TP
+.B RFC-1184
Telnet Linemode Option
-.It Cm RFC-1372
+.sp -1
+.TP
+.B RFC-1372
Telnet Remote Flow Control Option
-.It Cm RFC-1416
+.sp -1
+.TP
+.B RFC-1416
Telnet Authentication Option
-.It Cm RFC-1411
+.sp -1
+.TP
+.B RFC-1411
Telnet Authentication: Kerberos Version 4
-.It Cm RFC-1412
+.sp -1
+.TP
+.B RFC-1412
Telnet Authentication: SPX
-.It Cm RFC-1571
+.sp -1
+.TP
+.B RFC-1571
Telnet Environment Option Interoperability Issues
-.It Cm RFC-1572
+.sp -1
+.TP
+.B RFC-1572
Telnet Environment Option
-.Sh BUGS
+.SH BUGS
Some
-.Tn TELNET
+.SM TELNET
commands are only partially implemented.
-.Pp
+.PP
Because of bugs in the original 4.2 BSD
-.Xr telnet 1 ,
-.Nm telnetd
-performs some dubious protocol exchanges to try to discover if the remote
-client is, in fact, a 4.2 BSD
-.Xr telnet 1 .
-.Pp
-Binary mode
-has no common interpretation except between similar operating systems
-(Unix in this case).
-.Pp
+.IR telnet (1),
+.B telnetd
+performs some dubious protocol exchanges to try to discover if the
+remote client is, in fact, a 4.2 BSD
+.IR telnet (1).
+.PP
+Binary mode has no common interpretation except between similar
+operating systems (Unix in this case).
+.PP
The terminal type name received from the remote client is converted to
lower case.
-.Pp
-.Nm Telnetd
+.PP
+.B Telnetd
never sends
-.Tn TELNET
-.Dv IAC GA
+.SM TELNET
+.SM IAC GA
(go ahead) commands.