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

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