[BACK]Return to telnet.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / telnet

Annotation of src/usr.bin/telnet/telnet.1, Revision 1.22

1.22    ! aaron       1: .\"    $OpenBSD: telnet.1,v 1.21 2000/03/04 22:19:26 aaron Exp $
1.2       niklas      2: .\"    $NetBSD: telnet.1,v 1.5 1996/02/28 21:04:12 thorpej Exp $
                      3: .\"
1.1       deraadt     4: .\" Copyright (c) 1983, 1990, 1993
                      5: .\"    The Regents of the University of California.  All rights reserved.
                      6: .\"
                      7: .\" Redistribution and use in source and binary forms, with or without
                      8: .\" modification, are permitted provided that the following conditions
                      9: .\" are met:
                     10: .\" 1. Redistributions of source code must retain the above copyright
                     11: .\"    notice, this list of conditions and the following disclaimer.
                     12: .\" 2. Redistributions in binary form must reproduce the above copyright
                     13: .\"    notice, this list of conditions and the following disclaimer in the
                     14: .\"    documentation and/or other materials provided with the distribution.
                     15: .\" 3. All advertising materials mentioning features or use of this software
                     16: .\"    must display the following acknowledgement:
                     17: .\"    This product includes software developed by the University of
                     18: .\"    California, Berkeley and its contributors.
                     19: .\" 4. Neither the name of the University nor the names of its contributors
                     20: .\"    may be used to endorse or promote products derived from this software
                     21: .\"    without specific prior written permission.
                     22: .\"
                     23: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     24: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     25: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     26: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     27: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     28: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     29: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     30: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     31: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     32: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     33: .\" SUCH DAMAGE.
                     34: .\"
                     35: .\"    from: @(#)telnet.1      8.4 (Berkeley) 2/3/94
                     36: .\"
                     37: .Dd February 3, 1994
                     38: .Dt TELNET 1
1.16      aaron      39: .Os
1.1       deraadt    40: .Sh NAME
                     41: .Nm telnet
1.16      aaron      42: .Nd user interface to the
1.1       deraadt    43: .Tn TELNET
                     44: protocol
                     45: .Sh SYNOPSIS
                     46: .Nm telnet
                     47: .Op Fl 8
                     48: .Op Fl E
                     49: .Op Fl F
                     50: .Op Fl K
                     51: .Op Fl L
                     52: .Op Fl S Ar tos
                     53: .Op Fl X Ar authtype
                     54: .Op Fl a
1.3       niklas     55: .Op Fl b Ar hostalias
1.1       deraadt    56: .Op Fl c
                     57: .Op Fl d
                     58: .Op Fl e Ar escapechar
                     59: .Op Fl f
                     60: .Op Fl k Ar realm
                     61: .Op Fl l Ar user
                     62: .Op Fl n Ar tracefile
                     63: .Op Fl r
                     64: .Op Fl x
                     65: .Oo
                     66: .Ar host
1.9       deraadt    67: .Op Ar port
1.1       deraadt    68: .Oc
                     69: .Sh DESCRIPTION
                     70: The
1.22    ! aaron      71: .Nm
1.1       deraadt    72: command
1.16      aaron      73: is used to communicate with another host using the
1.1       deraadt    74: .Tn TELNET
                     75: protocol.
                     76: If
1.22    ! aaron      77: .Nm
1.1       deraadt    78: is invoked without the
                     79: .Ar host
                     80: argument, it enters command mode,
                     81: indicated by its prompt
                     82: .Pq Nm telnet\&> .
                     83: In this mode, it accepts and executes the commands listed below.
                     84: If it is invoked with arguments, it performs an
                     85: .Ic open
                     86: command with those arguments.
                     87: .Pp
1.19      aaron      88: The options are as follows:
1.1       deraadt    89: .Bl -tag -width indent
                     90: .It Fl 8
1.22    ! aaron      91: Specifies an 8-bit data path.
        !            92: This causes an attempt to negotiate the
1.1       deraadt    93: .Dv TELNET BINARY
                     94: option on both input and output.
                     95: .It Fl E
                     96: Stops any character from being recognized as an escape character.
                     97: .It Fl F
                     98: If Kerberos V5 authentication is being used, the
                     99: .Fl F
                    100: option allows the local credentials to be forwarded
                    101: to the remote system, including any credentials that
                    102: have already been forwarded into the local environment.
                    103: .It Fl K
                    104: Specifies no automatic login to the remote system.
                    105: .It Fl L
1.22    ! aaron     106: Specifies an 8-bit data path on output.
        !           107: This causes the BINARY option to be negotiated on output.
1.1       deraadt   108: .It Fl S Ar tos
                    109: Sets the IP type-of-service (TOS) option for the telnet
                    110: connection to the value
1.12      aaron     111: .Ar tos ,
1.1       deraadt   112: which can be a numeric TOS value
                    113: or, on systems that support it, a symbolic
1.12      aaron     114: TOS name found in the
                    115: .Pa /etc/iptos
                    116: file.
1.16      aaron     117: .It Fl X Ar atype
1.1       deraadt   118: Disables the
                    119: .Ar atype
                    120: type of authentication.
                    121: .It Fl a
                    122: Attempt automatic login.
                    123: Currently, this sends the user name via the
                    124: .Ev USER
                    125: variable
                    126: of the
                    127: .Ev ENVIRON
                    128: option if supported by the remote system.
                    129: The name used is that of the current user as returned by
                    130: .Xr getlogin 2
                    131: if it agrees with the current user ID,
                    132: otherwise it is the name associated with the user ID.
1.3       niklas    133: .It Fl b Ar hostalias
                    134: Uses
                    135: .Xr bind 2
1.12      aaron     136: on the local socket to bind it to an aliased address (see
1.3       niklas    137: .Xr ifconfig 8
1.12      aaron     138: and the ``alias'' specifier) or to the address of
1.3       niklas    139: another interface than the one naturally chosen by
                    140: .Xr connect 2 .
1.12      aaron     141: This can be useful when connecting to services which use IP addresses
1.3       niklas    142: for authentication and reconfiguration of the server is undesirable (or
                    143: impossible).
1.1       deraadt   144: .It Fl c
                    145: Disables the reading of the user's
                    146: .Pa \&.telnetrc
1.22    ! aaron     147: file.
        !           148: (See the
1.1       deraadt   149: .Ic toggle skiprc
                    150: command on this man page.)
                    151: .It Fl d
                    152: Sets the initial value of the
                    153: .Ic debug
                    154: toggle to
1.12      aaron     155: .Dv TRUE .
1.16      aaron     156: .It Fl e Ar escapechar
1.1       deraadt   157: Sets the initial
                    158: .Nm
                    159: escape character to
1.9       deraadt   160: .Ar escapechar Ns .
1.1       deraadt   161: If
1.8       deraadt   162: .Ar escapechar
1.1       deraadt   163: is omitted, then
                    164: there will be no escape character.
                    165: .It Fl f
                    166: If Kerberos V5 authentication is being used, the
                    167: .Fl f
                    168: option allows the local credentials to be forwarded to the remote system.
                    169: .It Fl k Ar realm
                    170: If Kerberos authentication is being used, the
                    171: .Fl k
1.12      aaron     172: option requests that
1.22    ! aaron     173: .Nm
1.12      aaron     174: obtain tickets for the remote host in
1.8       deraadt   175: realm
                    176: .Ar realm
                    177: instead of the remote host's realm, as determined
1.1       deraadt   178: by
                    179: .Xr krb_realmofhost 3 .
1.16      aaron     180: .It Fl l Ar user
1.1       deraadt   181: When connecting to the remote system, if the remote system
                    182: understands the
                    183: .Ev ENVIRON
                    184: option, then
                    185: .Ar user
                    186: will be sent to the remote system as the value for the variable USER.
                    187: This option implies the
                    188: .Fl a
                    189: option.
                    190: This option may also be used with the
                    191: .Ic open
                    192: command.
1.16      aaron     193: .It Fl n Ar tracefile
1.1       deraadt   194: Opens
                    195: .Ar tracefile
                    196: for recording trace information.
                    197: See the
                    198: .Ic set tracefile
                    199: command below.
                    200: .It Fl r
                    201: Specifies a user interface similar to
                    202: .Xr rlogin 1 .
                    203: In this
                    204: mode, the escape character is set to the tilde (~) character,
1.8       deraadt   205: unless modified by the
                    206: .Fl e
                    207: option.
1.1       deraadt   208: .It Fl x
1.10      art       209: Turns on encryption of the data stream if possible.
1.1       deraadt   210: .It Ar host
                    211: Indicates the official name, an alias, or the Internet address
                    212: of a remote host.
                    213: .It Ar port
1.22    ! aaron     214: Indicates a port number (address of an application).
        !           215: If a number is not specified, the default
        !           216: .Nm
1.1       deraadt   217: port is used.
                    218: .El
                    219: .Pp
1.22    ! aaron     220: When in rlogin mode, a line of the form ~.
        !           221: disconnects from the
1.1       deraadt   222: remote host; ~ is the telnet escape character.
                    223: Similarly, the line ~^Z suspends the telnet session.
                    224: The line ~^] escapes to the normal telnet escape prompt.
                    225: .Pp
                    226: Once a connection has been opened,
1.22    ! aaron     227: .Nm
1.1       deraadt   228: will attempt to enable the
                    229: .Dv TELNET LINEMODE
                    230: option.
1.12      aaron     231: If this fails,
1.22    ! aaron     232: .Nm
1.1       deraadt   233: will revert to one of two input modes:
1.12      aaron     234: either ``character at a time''
                    235: or ``old line by line''
1.1       deraadt   236: depending on what the remote system supports.
                    237: .Pp
1.16      aaron     238: When
1.1       deraadt   239: .Dv LINEMODE
                    240: is enabled, character processing is done on the
1.22    ! aaron     241: local system, under the control of the remote system.
        !           242: When input
1.1       deraadt   243: editing or character echoing is to be disabled, the remote system
1.22    ! aaron     244: will relay that information.
        !           245: The remote system will also relay
1.1       deraadt   246: changes to any special characters that happen on the remote
                    247: system, so that they can take effect on the local system.
                    248: .Pp
1.12      aaron     249: In ``character at a time'' mode, most
1.1       deraadt   250: text typed is immediately sent to the remote host for processing.
                    251: .Pp
1.12      aaron     252: In ``old line by line'' mode, all text is echoed locally,
1.1       deraadt   253: and (normally) only completed lines are sent to the remote host.
1.12      aaron     254: The ``local echo character'' (initially ``^E'') may be used
1.1       deraadt   255: to turn off and on the local echo
                    256: (this would mostly be used to enter passwords
                    257: without the password being echoed).
                    258: .Pp
1.16      aaron     259: If the
1.1       deraadt   260: .Dv LINEMODE
                    261: option is enabled, or if the
                    262: .Ic localchars
                    263: toggle is
                    264: .Dv TRUE
1.12      aaron     265: (the default for ``old line by line''; see below),
1.1       deraadt   266: the user's
1.12      aaron     267: .Ic quit ,
1.1       deraadt   268: .Ic intr ,
                    269: and
                    270: .Ic flush
                    271: characters are trapped locally, and sent as
                    272: .Tn TELNET
                    273: protocol sequences to the remote side.
1.16      aaron     274: If
1.1       deraadt   275: .Dv LINEMODE
                    276: has ever been enabled, then the user's
                    277: .Ic susp
                    278: and
                    279: .Ic eof
                    280: are also sent as
                    281: .Tn TELNET
                    282: protocol sequences,
                    283: and
                    284: .Ic quit
1.16      aaron     285: is sent as a
1.1       deraadt   286: .Dv TELNET ABORT
1.16      aaron     287: instead of
1.8       deraadt   288: .Dv BREAK .
1.1       deraadt   289: There are options (see
                    290: .Ic toggle
                    291: .Ic autoflush
                    292: and
                    293: .Ic toggle
                    294: .Ic autosynch
                    295: below)
                    296: which cause this action to flush subsequent output to the terminal
                    297: (until the remote host acknowledges the
                    298: .Tn TELNET
                    299: sequence) and flush previous terminal input
                    300: (in the case of
                    301: .Ic quit
                    302: and
1.22    ! aaron     303: .Ic intr ) .
1.1       deraadt   304: .Pp
                    305: While connected to a remote host,
1.22    ! aaron     306: .Nm
1.1       deraadt   307: command mode may be entered by typing the
1.22    ! aaron     308: .Nm
1.12      aaron     309: ``escape character'' (initially ``^]'').
1.1       deraadt   310: When in command mode, the normal terminal editing conventions are available.
1.15      aaron     311: Note that the escape character will return to the command mode of the initial
1.18      alex      312: invocation of
1.22    ! aaron     313: .Nm
1.15      aaron     314: that has the controlling terminal. Use the
                    315: .Cm send escape
                    316: command to switch to command mode in subsequent
1.22    ! aaron     317: .Nm
1.15      aaron     318: processes on remote hosts.
1.1       deraadt   319: .Pp
                    320: The following
1.22    ! aaron     321: .Nm
1.1       deraadt   322: commands are available.
                    323: Only enough of each command to uniquely identify it need be typed
                    324: (this is also true for arguments to the
1.12      aaron     325: .Ic mode ,
1.1       deraadt   326: .Ic set ,
1.12      aaron     327: .Ic toggle ,
1.1       deraadt   328: .Ic unset ,
1.12      aaron     329: .Ic slc ,
1.1       deraadt   330: .Ic environ ,
                    331: and
                    332: .Ic display
                    333: commands).
                    334: .Bl -tag -width "mode type"
1.16      aaron     335: .It Ic auth Ar argument Op Ar ...
1.12      aaron     336: The
                    337: .Ic auth
                    338: command manipulates the information sent through the
1.1       deraadt   339: .Dv TELNET AUTHENTICATE
1.22    ! aaron     340: option.
        !           341: Valid arguments for the
        !           342: .Ic auth
        !           343: command are as follows:
1.1       deraadt   344: .Bl -tag -width "disable type"
                    345: .It Ic disable Ar type
1.12      aaron     346: Disables the specified
                    347: .Ar type
1.22    ! aaron     348: of authentication.
        !           349: To obtain a list of available types, use the
1.1       deraadt   350: .Ic auth disable \&?
                    351: command.
                    352: .It Ic enable Ar type
1.12      aaron     353: Enables the specified
                    354: .Ar type
1.22    ! aaron     355: of authentication.
        !           356: To obtain a list of available types, use the
1.1       deraadt   357: .Ic auth enable \&?
                    358: command.
                    359: .It Ic status
                    360: Lists the current status of the various types of
                    361: authentication.
                    362: .El
                    363: .It Ic close
                    364: Close a
                    365: .Tn TELNET
                    366: session and return to command mode.
1.16      aaron     367: .It Ic display Ar argument Op Ar ...
1.1       deraadt   368: Displays all, or some, of the
                    369: .Ic set
                    370: and
                    371: .Ic toggle
                    372: values (see below).
1.12      aaron     373: .It Ic encrypt Ar argument Op Ar ...
                    374: The
                    375: .Ic encrypt
                    376: command manipulates the information sent through the
1.1       deraadt   377: .Dv TELNET ENCRYPT
                    378: option.
1.14      aaron     379: .Pp
1.1       deraadt   380: Valid arguments for the encrypt command are as follows:
                    381: .Bl -tag -width Ar
                    382: .It Ic disable Ar type Ic [input|output]
1.12      aaron     383: Disables the specified
                    384: .Ar type
1.22    ! aaron     385: of encryption.
        !           386: If you omit
1.12      aaron     387: .Ic input
                    388: and
                    389: .Ic output ,
                    390: both input and output
1.22    ! aaron     391: are disabled.
        !           392: To obtain a list of available types, use the
1.1       deraadt   393: .Ic encrypt disable \&?
                    394: command.
                    395: .It Ic enable Ar type Ic [input|output]
1.12      aaron     396: Enables the specified
                    397: .Ar type
1.22    ! aaron     398: of encryption.
        !           399: If you omit
1.12      aaron     400: .Ic input
                    401: and
                    402: .Ic output ,
                    403: both input and output are
1.22    ! aaron     404: enabled.
        !           405: To obtain a list of available types, use the
1.1       deraadt   406: .Ic encrypt enable \&?
                    407: command.
                    408: .It Ic input
                    409: This is the same as the
                    410: .Ic encrypt start input
                    411: command.
                    412: .It Ic -input
                    413: This is the same as the
                    414: .Ic encrypt stop input
                    415: command.
                    416: .It Ic output
                    417: This is the same as the
                    418: .Ic encrypt start output
                    419: command.
                    420: .It Ic -output
                    421: This is the same as the
                    422: .Ic encrypt stop output
                    423: command.
                    424: .It Ic start Ic [input|output]
1.22    ! aaron     425: Attempts to start encryption.
        !           426: If you omit
1.1       deraadt   427: .Ic input
                    428: and
                    429: .Ic output,
1.22    ! aaron     430: both input and output are enabled.
        !           431: To obtain a list of available types, use the
1.1       deraadt   432: .Ic encrypt enable \&?
                    433: command.
                    434: .It Ic status
                    435: Lists the current status of encryption.
                    436: .It Ic stop Ic [input|output]
1.22    ! aaron     437: Stops encryption.
        !           438: If you omit
1.12      aaron     439: .Ic input
                    440: and
                    441: .Ic output ,
1.1       deraadt   442: encryption is on both input and output.
                    443: .It Ic type Ar type
                    444: Sets the default type of encryption to be used
                    445: with later
                    446: .Ic encrypt start
                    447: or
                    448: .Ic encrypt stop
                    449: commands.
                    450: .El
1.16      aaron     451: .It Ic environ Ar arguments Op Ar ...
1.1       deraadt   452: The
                    453: .Ic environ
                    454: command is used to manipulate the
1.11      deraadt   455: variables that may be sent through the
1.1       deraadt   456: .Dv TELNET ENVIRON
                    457: option.
                    458: The initial set of variables is taken from the users
                    459: environment, with only the
                    460: .Ev DISPLAY
                    461: and
                    462: .Ev PRINTER
                    463: variables being exported by default.
                    464: The
                    465: .Ev USER
                    466: variable is also exported if the
                    467: .Fl a
                    468: or
                    469: .Fl l
                    470: options are used.
                    471: .br
                    472: Valid arguments for the
                    473: .Ic environ
                    474: command are:
                    475: .Bl -tag -width Fl
1.16      aaron     476: .It Ic define Ar variable value
1.1       deraadt   477: Define the variable
                    478: .Ar variable
                    479: to have a value of
1.12      aaron     480: .Ar value .
1.1       deraadt   481: Any variables defined by this command are automatically exported.
                    482: The
                    483: .Ar value
                    484: may be enclosed in single or double quotes so
                    485: that tabs and spaces may be included.
1.16      aaron     486: .It Ic undefine Ar variable
1.1       deraadt   487: Remove
                    488: .Ar variable
                    489: from the list of environment variables.
1.16      aaron     490: .It Ic export Ar variable
1.1       deraadt   491: Mark the variable
                    492: .Ar variable
                    493: to be exported to the remote side.
1.16      aaron     494: .It Ic unexport Ar variable
1.1       deraadt   495: Mark the variable
                    496: .Ar variable
                    497: to not be exported unless
                    498: explicitly asked for by the remote side.
                    499: .It Ic list
                    500: List the current set of environment variables.
                    501: Those marked with a
                    502: .Cm *
                    503: will be sent automatically,
                    504: other variables will only be sent if explicitly requested.
                    505: .It Ic \&?
                    506: Prints out help information for the
                    507: .Ic environ
                    508: command.
                    509: .El
                    510: .It Ic logout
                    511: Sends the
                    512: .Dv TELNET LOGOUT
                    513: option to the remote side.
                    514: This command is similar to a
                    515: .Ic close
                    516: command; however, if the remote side does not support the
                    517: .Dv LOGOUT
                    518: option, nothing happens.
                    519: If, however, the remote side does support the
                    520: .Dv LOGOUT
                    521: option, this command should cause the remote side to close the
                    522: .Tn TELNET
                    523: connection.
                    524: If the remote side also supports the concept of
                    525: suspending a user's session for later reattachment,
                    526: the logout argument indicates that you
                    527: should terminate the session immediately.
1.16      aaron     528: .It Ic mode Ar type
1.12      aaron     529: .Ar type
1.1       deraadt   530: is one of several options, depending on the state of the
                    531: .Tn TELNET
                    532: session.
                    533: The remote host is asked for permission to go into the requested mode.
                    534: If the remote host is capable of entering that mode, the requested
                    535: mode will be entered.
                    536: .Bl -tag -width Ar
                    537: .It Ic character
                    538: Disable the
                    539: .Dv TELNET LINEMODE
                    540: option, or, if the remote side does not understand the
                    541: .Dv LINEMODE
1.12      aaron     542: option, then enter ``character at a time'' mode.
1.1       deraadt   543: .It Ic line
                    544: Enable the
                    545: .Dv TELNET LINEMODE
                    546: option, or, if the remote side does not understand the
                    547: .Dv LINEMODE
1.12      aaron     548: option, then attempt to enter ``old-line-by-line'' mode.
1.16      aaron     549: .It Ic isig Pq Ic \-isig
                    550: Attempt to enable (disable) the
1.1       deraadt   551: .Dv TRAPSIG
1.16      aaron     552: mode of the
1.1       deraadt   553: .Dv LINEMODE
                    554: option.
1.16      aaron     555: This requires that the
1.1       deraadt   556: .Dv LINEMODE
                    557: option be enabled.
1.16      aaron     558: .It Ic edit Pq Ic \-edit
                    559: Attempt to enable (disable) the
1.1       deraadt   560: .Dv EDIT
1.16      aaron     561: mode of the
1.1       deraadt   562: .Dv LINEMODE
                    563: option.
1.16      aaron     564: This requires that the
1.1       deraadt   565: .Dv LINEMODE
                    566: option be enabled.
1.16      aaron     567: .It Ic softtabs Pq Ic \-softtabs
                    568: Attempt to enable (disable) the
1.1       deraadt   569: .Dv SOFT_TAB
1.16      aaron     570: mode of the
1.1       deraadt   571: .Dv LINEMODE
                    572: option.
1.16      aaron     573: This requires that the
1.1       deraadt   574: .Dv LINEMODE
                    575: option be enabled.
1.16      aaron     576: .It Ic litecho Pq Ic \-litecho
                    577: Attempt to enable (disable) the
1.1       deraadt   578: .Dv LIT_ECHO
1.16      aaron     579: mode of the
1.1       deraadt   580: .Dv LINEMODE
                    581: option.
1.16      aaron     582: This requires that the
1.1       deraadt   583: .Dv LINEMODE
                    584: option be enabled.
                    585: .It Ic \&?
                    586: Prints out help information for the
                    587: .Ic mode
                    588: command.
                    589: .El
                    590: .It Xo
                    591: .Ic open Ar host
1.5       deraadt   592: .Op Fl l Ar user
                    593: .Oo Op Fl
1.1       deraadt   594: .Ar port Oc
                    595: .Xc
                    596: Open a connection to the named host.
                    597: If no port number
                    598: is specified,
1.22    ! aaron     599: .Nm
1.1       deraadt   600: will attempt to contact a
                    601: .Tn TELNET
                    602: server at the default port.
                    603: The host specification may be either a host name (see
1.7       deraadt   604: .Xr hosts 5 )
1.12      aaron     605: or an Internet address specified in the ``dot notation'' (see
1.1       deraadt   606: .Xr inet 3 ) .
                    607: The
1.5       deraadt   608: .Fl l
1.1       deraadt   609: option may be used to specify the user name
                    610: to be passed to the remote system via the
                    611: .Ev ENVIRON
                    612: option.
                    613: When connecting to a non-standard port,
1.22    ! aaron     614: .Nm
1.1       deraadt   615: omits any automatic initiation of
                    616: .Tn TELNET
1.22    ! aaron     617: options.
        !           618: When the port number is preceded by a minus sign,
1.1       deraadt   619: the initial option negotiation is done.
                    620: After establishing a connection, the file
                    621: .Pa \&.telnetrc
                    622: in the
1.22    ! aaron     623: user's home directory is opened.
        !           624: Lines beginning with a ``#'' are
        !           625: comment lines.
        !           626: Blank lines are ignored.
        !           627: Lines that begin
        !           628: without whitespace are the start of a machine entry.
        !           629: The first thing on the line is the name of the machine that is
        !           630: being connected to.
        !           631: The rest of the line, and successive
1.21      aaron     632: lines that begin with whitespace are assumed to be
1.22    ! aaron     633: .Nm
1.1       deraadt   634: commands and are processed as if they had been typed
                    635: in manually to the
1.22    ! aaron     636: .Nm
1.1       deraadt   637: command prompt.
                    638: .It Ic quit
                    639: Close any open
                    640: .Tn TELNET
                    641: session and exit
1.12      aaron     642: .Nm telnet .
                    643: An end-of-file (in command mode) will also close a session and exit.
1.16      aaron     644: .It Ic send Ar arguments
1.1       deraadt   645: Sends one or more special character sequences to the remote host.
                    646: The following are the arguments which may be specified
                    647: (more than one argument may be specified at a time):
                    648: .Bl -tag -width escape
                    649: .It Ic abort
                    650: Sends the
                    651: .Dv TELNET ABORT
                    652: (Abort
                    653: processes)
                    654: sequence.
                    655: .It Ic ao
                    656: Sends the
                    657: .Dv TELNET AO
                    658: (Abort Output) sequence, which should cause the remote system to flush
                    659: all output
                    660: .Em from
                    661: the remote system
                    662: .Em to
                    663: the user's terminal.
                    664: .It Ic ayt
                    665: Sends the
                    666: .Dv TELNET AYT
                    667: (Are You There)
                    668: sequence, to which the remote system may or may not choose to respond.
                    669: .It Ic brk
                    670: Sends the
                    671: .Dv TELNET BRK
                    672: (Break) sequence, which may have significance to the remote
                    673: system.
                    674: .It Ic ec
                    675: Sends the
                    676: .Dv TELNET EC
                    677: (Erase Character)
                    678: sequence, which should cause the remote system to erase the last character
                    679: entered.
                    680: .It Ic el
                    681: Sends the
                    682: .Dv TELNET EL
                    683: (Erase Line)
                    684: sequence, which should cause the remote system to erase the line currently
                    685: being entered.
                    686: .It Ic eof
                    687: Sends the
                    688: .Dv TELNET EOF
                    689: (End Of File)
                    690: sequence.
                    691: .It Ic eor
                    692: Sends the
                    693: .Dv TELNET EOR
                    694: (End of Record)
                    695: sequence.
                    696: .It Ic escape
                    697: Sends the current
1.22    ! aaron     698: .Nm
1.12      aaron     699: escape character (initially ``^]'').
1.1       deraadt   700: .It Ic ga
                    701: Sends the
                    702: .Dv TELNET GA
                    703: (Go Ahead)
                    704: sequence, which likely has no significance to the remote system.
                    705: .It Ic getstatus
                    706: If the remote side supports the
                    707: .Dv TELNET STATUS
                    708: command,
                    709: .Ic getstatus
                    710: will send the subnegotiation to request that the server send
                    711: its current option status.
                    712: .It Ic ip
                    713: Sends the
                    714: .Dv TELNET IP
                    715: (Interrupt Process) sequence, which should cause the remote
                    716: system to abort the currently running process.
                    717: .It Ic nop
                    718: Sends the
                    719: .Dv TELNET NOP
                    720: (No OPeration)
                    721: sequence.
                    722: .It Ic susp
                    723: Sends the
                    724: .Dv TELNET SUSP
                    725: (SUSPend process)
                    726: sequence.
                    727: .It Ic synch
                    728: Sends the
                    729: .Dv TELNET SYNCH
                    730: sequence.
                    731: This sequence causes the remote system to discard all previously typed
                    732: (but not yet read) input.
                    733: This sequence is sent as
                    734: .Tn TCP
                    735: urgent
                    736: data (and may not work if the remote system is a
                    737: .Bx 4.2
                    738: system -- if
1.12      aaron     739: it doesn't work, a lower case ``r'' may be echoed on the terminal).
1.1       deraadt   740: .It Ic do Ar cmd
1.12      aaron     741: Sends the
                    742: .Dv TELNET DO
                    743: .Ar cmd
                    744: sequence.
                    745: .Ar cmd
                    746: can be either a decimal number between 0 and 255,
                    747: or a symbolic name for a specific
                    748: .Dv TELNET
                    749: command.
                    750: .Ar cmd
                    751: can also be either
                    752: .Ic help
                    753: or
                    754: .Ic \&?
                    755: to print out help information, including
                    756: a list of known symbolic names.
1.1       deraadt   757: .It Ic dont Ar cmd
1.12      aaron     758: Sends the
                    759: .Dv TELNET DONT
                    760: .Ar cmd
                    761: sequence.
                    762: .Ar cmd
                    763: can be either a decimal number between 0 and 255,
                    764: or a symbolic name for a specific
                    765: .Dv TELNET
                    766: command.
                    767: .Ar cmd
                    768: can also be either
                    769: .Ic help
                    770: or
                    771: .Ic \&?
                    772: to print out help information, including
                    773: a list of known symbolic names.
1.1       deraadt   774: .It Ic will Ar cmd
1.12      aaron     775: Sends the
                    776: .Dv TELNET WILL
                    777: .Ar cmd
                    778: sequence.
                    779: .Ar cmd
                    780: can be either a decimal number between 0 and 255,
                    781: or a symbolic name for a specific
                    782: .Dv TELNET
                    783: command.
                    784: .Ar cmd
                    785: can also be either
                    786: .Ic help
                    787: or
                    788: .Ic \&?
                    789: to print out help information, including
                    790: a list of known symbolic names.
1.1       deraadt   791: .It Ic wont Ar cmd
                    792: Sends the
1.12      aaron     793: .Dv TELNET WONT
1.1       deraadt   794: .Ar cmd
                    795: sequence.
1.12      aaron     796: .Ar cmd
1.1       deraadt   797: can be either a decimal number between 0 and 255,
                    798: or a symbolic name for a specific
                    799: .Dv TELNET
                    800: command.
1.12      aaron     801: .Ar cmd
1.1       deraadt   802: can also be either
                    803: .Ic help
                    804: or
                    805: .Ic \&?
                    806: to print out help information, including
                    807: a list of known symbolic names.
                    808: .It Ic \&?
                    809: Prints out help information for the
                    810: .Ic send
                    811: command.
                    812: .El
1.16      aaron     813: .It Ic set Ar argument value
                    814: .It Ic unset Ar argument value
1.1       deraadt   815: The
                    816: .Ic set
                    817: command will set any one of a number of
1.22    ! aaron     818: .Nm
1.1       deraadt   819: variables to a specific value or to
                    820: .Dv TRUE .
                    821: The special value
                    822: .Ic off
                    823: turns off the function associated with
1.12      aaron     824: the variable; this is equivalent to using the
1.1       deraadt   825: .Ic unset
                    826: command.
                    827: The
                    828: .Ic unset
                    829: command will disable or set to
                    830: .Dv FALSE
                    831: any of the specified functions.
                    832: The values of variables may be interrogated with the
                    833: .Ic display
                    834: command.
                    835: The variables which may be set or unset, but not toggled, are
1.22    ! aaron     836: listed here.
        !           837: In addition, any of the variables for the
1.1       deraadt   838: .Ic toggle
                    839: command may be explicitly set or unset using
                    840: the
                    841: .Ic set
                    842: and
                    843: .Ic unset
                    844: commands.
                    845: .Bl -tag -width escape
                    846: .It Ic ayt
                    847: If
                    848: .Tn TELNET
1.12      aaron     849: is in
                    850: .Ic localchars
                    851: mode, or
1.1       deraadt   852: .Dv LINEMODE
                    853: is enabled, and the status character is typed, a
                    854: .Dv TELNET AYT
                    855: sequence (see
                    856: .Ic send ayt
                    857: preceding) is sent to the
1.22    ! aaron     858: remote host.
        !           859: The initial value for the "Are You There"
1.1       deraadt   860: character is the terminal's status character.
                    861: .It Ic echo
1.12      aaron     862: This is the value (initially ``^E'') which, when in
                    863: ``line by line'' mode, toggles between doing local echoing
1.1       deraadt   864: of entered characters (for normal processing), and suppressing
                    865: echoing of entered characters (for entering, say, a password).
                    866: .It Ic eof
                    867: If
1.22    ! aaron     868: .Nm
1.1       deraadt   869: is operating in
                    870: .Dv LINEMODE
1.12      aaron     871: or ``old line by line'' mode, entering this character
1.1       deraadt   872: as the first character on a line will cause this character to be
                    873: sent to the remote system.
1.12      aaron     874: The initial value of the
                    875: .Ic eof
                    876: character is taken to be the terminal's
1.1       deraadt   877: .Ic eof
                    878: character.
                    879: .It Ic erase
                    880: If
1.22    ! aaron     881: .Nm
1.1       deraadt   882: is in
                    883: .Ic localchars
                    884: mode (see
                    885: .Ic toggle
                    886: .Ic localchars
                    887: below),
1.12      aaron     888: and if
1.22    ! aaron     889: .Nm
1.12      aaron     890: is operating in ``character at a time'' mode, then when this
1.1       deraadt   891: character is typed, a
                    892: .Dv TELNET EC
                    893: sequence (see
                    894: .Ic send
                    895: .Ic ec
                    896: above)
                    897: is sent to the remote system.
1.12      aaron     898: The initial value for the
                    899: .Ic erase
                    900: character is taken to be
1.1       deraadt   901: the terminal's
                    902: .Ic erase
                    903: character.
                    904: .It Ic escape
                    905: This is the
1.22    ! aaron     906: .Nm
1.12      aaron     907: escape character (initially ``^['') which causes entry
1.1       deraadt   908: into
1.22    ! aaron     909: .Nm
1.1       deraadt   910: command mode (when connected to a remote system).
                    911: .It Ic flushoutput
                    912: If
1.22    ! aaron     913: .Nm
1.1       deraadt   914: is in
                    915: .Ic localchars
                    916: mode (see
                    917: .Ic toggle
                    918: .Ic localchars
                    919: below)
                    920: and the
                    921: .Ic flushoutput
                    922: character is typed, a
                    923: .Dv TELNET AO
                    924: sequence (see
                    925: .Ic send
                    926: .Ic ao
                    927: above)
                    928: is sent to the remote host.
1.12      aaron     929: The initial value for the
                    930: .Ic flush
                    931: character is taken to be
1.1       deraadt   932: the terminal's
                    933: .Ic flush
                    934: character.
                    935: .It Ic forw1
                    936: .It Ic forw2
                    937: If
                    938: .Tn TELNET
                    939: is operating in
                    940: .Dv LINEMODE ,
                    941: these are the
                    942: characters that, when typed, cause partial lines to be
1.22    ! aaron     943: forwarded to the remote system.
        !           944: The initial value for
1.1       deraadt   945: the forwarding characters are taken from the terminal's
                    946: eol and eol2 characters.
                    947: .It Ic interrupt
                    948: If
1.22    ! aaron     949: .Nm
1.1       deraadt   950: is in
                    951: .Ic localchars
                    952: mode (see
                    953: .Ic toggle
                    954: .Ic localchars
                    955: below)
                    956: and the
                    957: .Ic interrupt
                    958: character is typed, a
                    959: .Dv TELNET IP
                    960: sequence (see
                    961: .Ic send
                    962: .Ic ip
                    963: above)
                    964: is sent to the remote host.
1.12      aaron     965: The initial value for the
                    966: .Ic interrupt
                    967: character is taken to be
1.1       deraadt   968: the terminal's
                    969: .Ic intr
                    970: character.
                    971: .It Ic kill
                    972: If
1.22    ! aaron     973: .Nm
1.1       deraadt   974: is in
                    975: .Ic localchars
                    976: mode (see
                    977: .Ic toggle
                    978: .Ic localchars
                    979: below),
1.12      aaron     980: and if
1.22    ! aaron     981: .Nm
1.12      aaron     982: is operating in ``character at a time'' mode, then when this
1.1       deraadt   983: character is typed, a
                    984: .Dv TELNET EL
                    985: sequence (see
                    986: .Ic send
                    987: .Ic el
                    988: above)
                    989: is sent to the remote system.
1.12      aaron     990: The initial value for the
                    991: .Ic kill
                    992: character is taken to be
1.1       deraadt   993: the terminal's
                    994: .Ic kill
                    995: character.
                    996: .It Ic lnext
                    997: If
1.22    ! aaron     998: .Nm
1.1       deraadt   999: is operating in
                   1000: .Dv LINEMODE
1.12      aaron    1001: or ``old line by line'' mode, then this character is taken to
1.1       deraadt  1002: be the terminal's
                   1003: .Ic lnext
                   1004: character.
1.12      aaron    1005: The initial value for the
                   1006: .Ic lnext
                   1007: character is taken to be
1.1       deraadt  1008: the terminal's
                   1009: .Ic lnext
                   1010: character.
                   1011: .It Ic quit
                   1012: If
1.22    ! aaron    1013: .Nm
1.1       deraadt  1014: is in
                   1015: .Ic localchars
                   1016: mode (see
                   1017: .Ic toggle
                   1018: .Ic localchars
                   1019: below)
                   1020: and the
                   1021: .Ic quit
                   1022: character is typed, a
                   1023: .Dv TELNET BRK
                   1024: sequence (see
                   1025: .Ic send
                   1026: .Ic brk
                   1027: above)
                   1028: is sent to the remote host.
1.12      aaron    1029: The initial value for the
                   1030: .Ic quit
                   1031: character is taken to be
1.1       deraadt  1032: the terminal's
                   1033: .Ic quit
                   1034: character.
                   1035: .It Ic reprint
                   1036: If
1.22    ! aaron    1037: .Nm
1.1       deraadt  1038: is operating in
                   1039: .Dv LINEMODE
1.12      aaron    1040: or old line by line'' mode, then this character is taken to
1.1       deraadt  1041: be the terminal's
                   1042: .Ic reprint
                   1043: character.
1.12      aaron    1044: The initial value for the
                   1045: .Ic reprint
                   1046: character is taken to be
1.1       deraadt  1047: the terminal's
                   1048: .Ic reprint
                   1049: character.
                   1050: .It Ic rlogin
                   1051: This is the rlogin escape character.
                   1052: If set, the normal
                   1053: .Tn TELNET
                   1054: escape character is ignored unless it is
                   1055: preceded by this character at the beginning of a line.
1.12      aaron    1056: This character, at the beginning of a line, followed by
                   1057: a "." closes the connection; when followed by a ^Z it
1.5       deraadt  1058: suspends the
1.22    ! aaron    1059: .Nm
        !          1060: command.
        !          1061: The initial state is to
1.12      aaron    1062: disable the
                   1063: .Ic rlogin
                   1064: escape character.
1.1       deraadt  1065: .It Ic start
                   1066: If the
                   1067: .Dv TELNET TOGGLE-FLOW-CONTROL
                   1068: option has been enabled,
                   1069: then this character is taken to
                   1070: be the terminal's
                   1071: .Ic start
                   1072: character.
1.12      aaron    1073: The initial value for the
                   1074: .Ic start
                   1075: character is taken to be
1.1       deraadt  1076: the terminal's
                   1077: .Ic start
                   1078: character.
                   1079: .It Ic stop
                   1080: If the
                   1081: .Dv TELNET TOGGLE-FLOW-CONTROL
                   1082: option has been enabled,
                   1083: then this character is taken to
                   1084: be the terminal's
                   1085: .Ic stop
                   1086: character.
1.12      aaron    1087: The initial value for the
                   1088: .Ic stop
                   1089: character is taken to be
1.1       deraadt  1090: the terminal's
                   1091: .Ic stop
                   1092: character.
                   1093: .It Ic susp
                   1094: If
1.22    ! aaron    1095: .Nm
1.1       deraadt  1096: is in
                   1097: .Ic localchars
                   1098: mode, or
                   1099: .Dv LINEMODE
                   1100: is enabled, and the
                   1101: .Ic suspend
                   1102: character is typed, a
                   1103: .Dv TELNET SUSP
                   1104: sequence (see
                   1105: .Ic send
                   1106: .Ic susp
                   1107: above)
                   1108: is sent to the remote host.
1.12      aaron    1109: The initial value for the
                   1110: .Ic suspend
                   1111: character is taken to be
1.1       deraadt  1112: the terminal's
                   1113: .Ic suspend
                   1114: character.
                   1115: .It Ic tracefile
                   1116: This is the file to which the output, caused by
                   1117: .Ic netdata
                   1118: or
                   1119: .Ic option
                   1120: tracing being
                   1121: .Dv TRUE ,
1.22    ! aaron    1122: will be written.
        !          1123: If it is set to
1.1       deraadt  1124: .Dq Fl ,
                   1125: then tracing information will be written to standard output (the default).
                   1126: .It Ic worderase
                   1127: If
1.22    ! aaron    1128: .Nm
1.1       deraadt  1129: is operating in
                   1130: .Dv LINEMODE
1.12      aaron    1131: or ``old line by line'' mode, then this character is taken to
1.1       deraadt  1132: be the terminal's
                   1133: .Ic worderase
                   1134: character.
1.12      aaron    1135: The initial value for the
                   1136: .Ic worderase
                   1137: character is taken to be
1.1       deraadt  1138: the terminal's
                   1139: .Ic worderase
                   1140: character.
                   1141: .It Ic \&?
                   1142: Displays the legal
                   1143: .Ic set
                   1144: .Pq Ic unset
                   1145: commands.
                   1146: .El
1.17      aaron    1147: .It Ic skey Ar sequence challenge
                   1148: The
                   1149: .Ic skey
                   1150: command computes a response to the S/Key challenge. See
                   1151: .Xr skey 1
                   1152: for more information on the S/Key system.
1.16      aaron    1153: .It Ic slc Ar state
1.1       deraadt  1154: The
                   1155: .Ic slc
                   1156: command (Set Local Characters) is used to set
1.4       deraadt  1157: or change the state of the special
1.16      aaron    1158: characters when the
1.1       deraadt  1159: .Dv TELNET LINEMODE
                   1160: option has
1.22    ! aaron    1161: been enabled.
        !          1162: Special characters are characters that get mapped to
1.1       deraadt  1163: .Tn TELNET
                   1164: commands sequences (like
                   1165: .Ic ip
                   1166: or
1.22    ! aaron    1167: .Ic quit )
1.1       deraadt  1168: or line editing characters (like
                   1169: .Ic erase
                   1170: and
1.22    ! aaron    1171: .Ic kill ) .
1.1       deraadt  1172: By default, the local special characters are exported.
                   1173: .Bl -tag -width Fl
                   1174: .It Ic check
                   1175: Verify the current settings for the current special characters.
                   1176: The remote side is requested to send all the current special
                   1177: character settings, and if there are any discrepancies with
                   1178: the local side, the local side will switch to the remote value.
                   1179: .It Ic export
1.22    ! aaron    1180: Switch to the local defaults for the special characters.
        !          1181: The local default characters are those of the local terminal at
1.1       deraadt  1182: the time when
1.22    ! aaron    1183: .Nm
1.1       deraadt  1184: was started.
                   1185: .It Ic import
                   1186: Switch to the remote defaults for the special characters.
                   1187: The remote default characters are those of the remote system
1.16      aaron    1188: at the time when the
1.1       deraadt  1189: .Tn TELNET
                   1190: connection was established.
                   1191: .It Ic \&?
                   1192: Prints out help information for the
                   1193: .Ic slc
                   1194: command.
                   1195: .El
                   1196: .It Ic status
                   1197: Show the current status of
1.12      aaron    1198: .Nm telnet .
1.1       deraadt  1199: This includes the peer one is connected to, as well
                   1200: as the current mode.
1.16      aaron    1201: .It Ic toggle Ar arguments Op Ar ...
1.1       deraadt  1202: Toggle (between
                   1203: .Dv TRUE
                   1204: and
                   1205: .Dv FALSE )
                   1206: various flags that control how
1.22    ! aaron    1207: .Nm
1.1       deraadt  1208: responds to events.
                   1209: These flags may be set explicitly to
                   1210: .Dv TRUE
                   1211: or
                   1212: .Dv FALSE
                   1213: using the
                   1214: .Ic set
                   1215: and
                   1216: .Ic unset
                   1217: commands listed above.
                   1218: More than one argument may be specified.
                   1219: The state of these flags may be interrogated with the
                   1220: .Ic display
                   1221: command.
                   1222: Valid arguments are:
                   1223: .Bl -tag -width Ar
                   1224: .It Ic authdebug
                   1225: Turns on debugging information for the authentication code.
                   1226: .It Ic autoflush
                   1227: If
                   1228: .Ic autoflush
                   1229: and
                   1230: .Ic localchars
                   1231: are both
                   1232: .Dv TRUE ,
                   1233: then when the
1.12      aaron    1234: .Ic ao
1.1       deraadt  1235: or
                   1236: .Ic quit
                   1237: characters are recognized (and transformed into
                   1238: .Tn TELNET
                   1239: sequences; see
                   1240: .Ic set
                   1241: above for details),
1.22    ! aaron    1242: .Nm
1.1       deraadt  1243: refuses to display any data on the user's terminal
                   1244: until the remote system acknowledges (via a
                   1245: .Dv TELNET TIMING MARK
                   1246: option)
                   1247: that it has processed those
                   1248: .Tn TELNET
                   1249: sequences.
                   1250: The initial value for this toggle is
                   1251: .Dv TRUE
                   1252: if the terminal user had not
                   1253: done an "stty noflsh", otherwise
                   1254: .Dv FALSE
                   1255: (see
1.22    ! aaron    1256: .Xr stty 1 ) .
1.1       deraadt  1257: .It Ic autodecrypt
                   1258: When the
                   1259: .Dv TELNET ENCRYPT
                   1260: option is negotiated, by
                   1261: default the actual encryption (decryption) of the data
1.22    ! aaron    1262: stream does not start automatically.
        !          1263: The
1.12      aaron    1264: .Ic autoencrypt
                   1265: .Pq Ic autodecrypt
                   1266: command states that encryption of the
1.1       deraadt  1267: output (input) stream should be enabled as soon as
                   1268: possible.
                   1269: .Pp
                   1270: .It Ic autologin
                   1271: If the remote side supports the
                   1272: .Dv TELNET AUTHENTICATION
                   1273: option
                   1274: .Tn TELNET
1.22    ! aaron    1275: attempts to use it to perform automatic authentication.
        !          1276: If the
1.1       deraadt  1277: .Dv AUTHENTICATION
                   1278: option is not supported, the user's login
                   1279: name are propagated through the
                   1280: .Dv TELNET ENVIRON
                   1281: option.
                   1282: This command is the same as specifying
                   1283: .Ar a
                   1284: option on the
                   1285: .Ic open
                   1286: command.
                   1287: .It Ic autosynch
                   1288: If
                   1289: .Ic autosynch
                   1290: and
                   1291: .Ic localchars
                   1292: are both
                   1293: .Dv TRUE ,
                   1294: then when either the
                   1295: .Ic intr
                   1296: or
                   1297: .Ic quit
1.12      aaron    1298: character is typed (see
1.1       deraadt  1299: .Ic set
                   1300: above for descriptions of the
                   1301: .Ic intr
                   1302: and
                   1303: .Ic quit
                   1304: characters), the resulting
                   1305: .Tn TELNET
                   1306: sequence sent is followed by the
                   1307: .Dv TELNET SYNCH
                   1308: sequence.
                   1309: This procedure
1.12      aaron    1310: .Em should
1.1       deraadt  1311: cause the remote system to begin throwing away all previously
                   1312: typed input until both of the
                   1313: .Tn TELNET
                   1314: sequences have been read and acted upon.
                   1315: The initial value of this toggle is
                   1316: .Dv FALSE .
                   1317: .It Ic binary
                   1318: Enable or disable the
                   1319: .Dv TELNET BINARY
                   1320: option on both input and output.
                   1321: .It Ic inbinary
                   1322: Enable or disable the
                   1323: .Dv TELNET BINARY
                   1324: option on input.
                   1325: .It Ic outbinary
                   1326: Enable or disable the
                   1327: .Dv TELNET BINARY
                   1328: option on output.
                   1329: .It Ic crlf
                   1330: If this is
                   1331: .Dv TRUE ,
                   1332: then carriage returns will be sent as
                   1333: .Li <CR><LF> .
                   1334: If this is
                   1335: .Dv FALSE ,
                   1336: then carriage returns will be send as
                   1337: .Li <CR><NUL> .
                   1338: The initial value for this toggle is
                   1339: .Dv FALSE .
                   1340: .It Ic crmod
                   1341: Toggle carriage return mode.
                   1342: When this mode is enabled, most carriage return characters received from
                   1343: the remote host will be mapped into a carriage return followed by
                   1344: a line feed.
                   1345: This mode does not affect those characters typed by the user, only
                   1346: those received from the remote host.
                   1347: This mode is not very useful unless the remote host
1.12      aaron    1348: only sends carriage return, but never line feeds.
1.1       deraadt  1349: The initial value for this toggle is
                   1350: .Dv FALSE .
                   1351: .It Ic debug
1.12      aaron    1352: Toggles socket level debugging (useful only to the super-user).
1.1       deraadt  1353: The initial value for this toggle is
                   1354: .Dv FALSE .
                   1355: .It Ic encdebug
                   1356: Turns on debugging information for the encryption code.
                   1357: .It Ic localchars
                   1358: If this is
                   1359: .Dv TRUE ,
                   1360: then the
1.12      aaron    1361: .Ic flush ,
1.1       deraadt  1362: .Ic interrupt ,
1.12      aaron    1363: .Ic quit ,
1.1       deraadt  1364: .Ic erase ,
                   1365: and
                   1366: .Ic kill
                   1367: characters (see
                   1368: .Ic set
                   1369: above) are recognized locally, and transformed into (hopefully) appropriate
                   1370: .Tn TELNET
                   1371: control sequences
                   1372: (respectively
1.12      aaron    1373: .Ic ao ,
1.1       deraadt  1374: .Ic ip ,
1.12      aaron    1375: .Ic brk ,
1.1       deraadt  1376: .Ic ec ,
                   1377: and
1.22    ! aaron    1378: .Ic el ;
1.1       deraadt  1379: see
                   1380: .Ic send
                   1381: above).
                   1382: The initial value for this toggle is
                   1383: .Dv TRUE
1.12      aaron    1384: in ``old line by line'' mode,
1.1       deraadt  1385: and
                   1386: .Dv FALSE
1.12      aaron    1387: in ``character at a time'' mode.
1.1       deraadt  1388: When the
                   1389: .Dv LINEMODE
                   1390: option is enabled, the value of
                   1391: .Ic localchars
                   1392: is ignored, and assumed to always be
                   1393: .Dv TRUE .
                   1394: If
                   1395: .Dv LINEMODE
                   1396: has ever been enabled, then
                   1397: .Ic quit
                   1398: is sent as
1.12      aaron    1399: .Ic abort ,
                   1400: and
                   1401: .Ic eof
1.1       deraadt  1402: and
1.5       deraadt  1403: .Ic suspend
1.1       deraadt  1404: are sent as
1.12      aaron    1405: .Ic eof
                   1406: and
1.5       deraadt  1407: .Ic susp
                   1408: (see
1.1       deraadt  1409: .Ic send
                   1410: above).
                   1411: .It Ic netdata
                   1412: Toggles the display of all network data (in hexadecimal format).
                   1413: The initial value for this toggle is
                   1414: .Dv FALSE .
                   1415: .It Ic options
                   1416: Toggles the display of some internal
1.22    ! aaron    1417: .Nm
1.1       deraadt  1418: protocol processing (having to do with
                   1419: .Tn TELNET
                   1420: options).
                   1421: The initial value for this toggle is
                   1422: .Dv FALSE .
                   1423: .It Ic prettydump
                   1424: When the
                   1425: .Ic netdata
                   1426: toggle is enabled, if
                   1427: .Ic prettydump
                   1428: is enabled the output from the
                   1429: .Ic netdata
                   1430: command will be formatted in a more user readable format.
                   1431: Spaces are put between each character in the output, and the
                   1432: beginning of any
                   1433: .Tn TELNET
                   1434: escape sequence is preceded by a '*' to aid in locating them.
                   1435: .It Ic skiprc
                   1436: When the skiprc toggle is
                   1437: .Dv TRUE ,
                   1438: .Tn TELNET
                   1439: skips the reading of the
                   1440: .Pa \&.telnetrc
1.12      aaron    1441: file in the user's home
1.22    ! aaron    1442: directory when connections are opened.
        !          1443: The initial value for this toggle is
1.13      aaron    1444: .Dv FALSE .
1.1       deraadt  1445: .It Ic termdata
                   1446: Toggles the display of all terminal data (in hexadecimal format).
                   1447: The initial value for this toggle is
                   1448: .Dv FALSE .
                   1449: .It Ic verbose_encrypt
                   1450: When the
                   1451: .Ic verbose_encrypt
                   1452: toggle is
                   1453: .Dv TRUE ,
1.22    ! aaron    1454: .Nm
1.1       deraadt  1455: prints out a message each time encryption is enabled or
1.22    ! aaron    1456: disabled.
        !          1457: The initial value for this toggle is
1.13      aaron    1458: .Dv FALSE .
1.1       deraadt  1459: .It Ic \&?
                   1460: Displays the legal
                   1461: .Ic toggle
                   1462: commands.
                   1463: .El
                   1464: .It Ic z
                   1465: Suspend
1.12      aaron    1466: .Nm telnet .
1.1       deraadt  1467: This command only works when the user is using the
1.12      aaron    1468: .Xr csh 1 .
1.16      aaron    1469: .It Ic \&! Op Ar command
1.1       deraadt  1470: Execute a single command in a subshell on the local
1.22    ! aaron    1471: system.
        !          1472: If
1.5       deraadt  1473: .Ar command
1.1       deraadt  1474: is omitted, then an interactive
                   1475: subshell is invoked.
1.16      aaron    1476: .It Ic \&? Op Ar command
1.22    ! aaron    1477: Get help.
        !          1478: With no arguments,
        !          1479: .Nm
1.1       deraadt  1480: prints a help summary.
                   1481: If a command is specified,
1.22    ! aaron    1482: .Nm
1.1       deraadt  1483: will print the help information for just that command.
                   1484: .El
                   1485: .Sh ENVIRONMENT
1.22    ! aaron    1486: .Nm
1.1       deraadt  1487: uses at least the
                   1488: .Ev HOME ,
                   1489: .Ev SHELL ,
                   1490: .Ev DISPLAY ,
                   1491: and
                   1492: .Ev TERM
                   1493: environment variables.
                   1494: Other environment variables may be propagated
                   1495: to the other side via the
                   1496: .Dv TELNET ENVIRON
                   1497: option.
                   1498: .Sh FILES
                   1499: .Bl -tag -width ~/.telnetrc -compact
                   1500: .It Pa ~/.telnetrc
                   1501: user customized telnet startup values
                   1502: .El
                   1503: .Sh HISTORY
                   1504: The
1.22    ! aaron    1505: .Nm
1.1       deraadt  1506: command appeared in
                   1507: .Bx 4.2 .
                   1508: .Sh NOTES
                   1509: On some remote systems, echo has to be turned off manually when in
1.12      aaron    1510: ``old line by line'' mode.
1.1       deraadt  1511: .Pp
1.16      aaron    1512: In ``old line by line'' mode or
1.1       deraadt  1513: .Dv LINEMODE
                   1514: the terminal's
                   1515: .Ic eof
                   1516: character is only recognized (and sent to the remote system)
                   1517: when it is the first character on a line.
1.20      itojun   1518: .Pp
                   1519: Source routing is not supported yet for IPv6.