[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.19

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