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

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