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

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