1 .\" Copyright (c) 1983, 1990, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)telnet.1 8.6 (Berkeley) 6/1/94
33 .\" $FreeBSD: src/crypto/telnet/telnet/telnet.1,v 1.4.2.9 2002/04/13 10:59:08 markm Exp $
40 .Nd user interface to the
45 .Op Fl 468EFKLNacdfruxy
48 .Op Fl e Ar escapechar
61 is used to communicate with another host using the
66 is invoked without the
68 argument, it enters command mode,
69 indicated by its prompt
71 In this mode, it accepts and executes the commands listed below.
72 If it is invoked with arguments, it performs an
74 command with those arguments.
77 .Bl -tag -width indent
81 to use IPv4 addresses only.
85 to use IPv6 addresses only.
87 Specifies an 8-bit data path. This causes an attempt to
90 option on both input and output.
92 Stops any character from being recognized as an escape character.
94 If Kerberos V5 authentication is being used, the
96 option allows the local credentials to be forwarded
97 to the remote system, including any credentials that
98 have already been forwarded into the local environment.
100 Specifies no automatic login to the remote system.
102 Specifies an 8-bit data path on output. This causes the
104 option to be negotiated on output.
106 Prevents IP address to name lookup when destination host is given
109 Sets the IP type-of-service (TOS) option for the telnet
110 connection to the value
112 which can be a numeric TOS value
113 or, on systems that support it, a symbolic
114 TOS name found in the
120 type of authentication.
122 Attempt automatic login.
123 This is now the default, so this option is ignored.
124 Currently, this sends the user name via the
129 option if supported by the remote system.
130 The name used is that of the current user as returned by
132 if it agrees with the current user ID,
133 otherwise it is the name associated with the user ID.
135 Disables the reading of the user's
139 command on this man page.)
141 Sets the initial value of the
145 .It Fl e Ar escapechar
153 there will be no escape character.
155 If Kerberos V5 authentication is being used, the
157 option allows the local credentials to be forwarded to the remote system.
159 If Kerberos authentication is being used, the
163 obtain tickets for the remote host in
166 instead of the remote host's realm, as determined by
167 .Xr krb_realmofhost 3 .
169 When connecting to the remote system, if the remote system
174 will be sent to the remote system as the value for the variable
176 This option implies the
179 This option may also be used with the
182 .It Fl n Ar tracefile
185 for recording trace information.
190 Specifies a user interface similar to
193 mode, the escape character is set to the tilde (~) character,
194 unless modified by the
198 Set the source IP address for the
202 which can be an IP address or a host name.
208 addresses only (e.g.,
210 domain sockets, accessed with a file path).
212 Turns on encryption of the data stream if possible.
213 This is now the default, so this option is ignored.
215 Suppresses encryption of the data stream.
217 Indicates the official name, an alias, or the Internet address
224 establishes a connection to the corresponding named socket.
226 Indicates a port number (address of an application). If a number is
227 not specified, the default
232 When in rlogin mode, a line of the form ~. disconnects from the
233 remote host; ~ is the
236 Similarly, the line ~^Z suspends the
239 The line ~^] escapes to the normal
243 Once a connection has been opened,
245 will attempt to enable the
250 will revert to one of two input modes:
251 either \*(Lqcharacter at a time\*(Rq
252 or \*(Lqold line by line\*(Rq
253 depending on what the remote system supports.
257 is enabled, character processing is done on the
258 local system, under the control of the remote system. When input
259 editing or character echoing is to be disabled, the remote system
260 will relay that information. The remote system will also relay
261 changes to any special characters that happen on the remote
262 system, so that they can take effect on the local system.
264 In \*(Lqcharacter at a time\*(Rq mode, most
265 text typed is immediately sent to the remote host for processing.
267 In \*(Lqold line by line\*(Rq mode, all text is echoed locally,
268 and (normally) only completed lines are sent to the remote host.
269 The \*(Lqlocal echo character\*(Rq (initially \*(Lq^E\*(Rq) may be used
270 to turn off and on the local echo
271 (this would mostly be used to enter passwords
272 without the password being echoed).
276 option is enabled, or if the
280 (the default for \*(Lqold line by line\*(Rq; see below),
286 characters are trapped locally, and sent as
288 protocol sequences to the remote side.
291 has ever been enabled, then the user's
304 There are options (see
311 which cause this action to flush subsequent output to the terminal
312 (until the remote host acknowledges the
314 sequence) and flush previous terminal input
320 While connected to a remote host,
322 command mode may be entered by typing the
324 \*(Lqescape character\*(Rq (initially \*(Lq^]\*(Rq).
325 When in command mode, the normal terminal editing conventions are available.
329 commands are available.
330 Only enough of each command to uniquely identify it need be typed
331 (this is also true for arguments to the
342 .Bl -tag -width "mode type"
343 .It Ic auth Ar argument ...
344 The auth command manipulates the information sent through the
345 .Dv TELNET AUTHENTICATE
346 option. Valid arguments for the
349 .Bl -tag -width "disable type"
350 .It Ic disable Ar type
351 Disables the specified type of authentication. To
352 obtain a list of available types, use the
355 .It Ic enable Ar type
356 Enables the specified type of authentication. To
357 obtain a list of available types, use the
361 Lists the current status of the various types of
367 session and return to command mode.
368 .It Ic display Ar argument ...
369 Displays all, or some, of the
374 .It Ic encrypt Ar argument ...
375 The encrypt command manipulates the information sent through the
379 Valid arguments for the
383 .It Ic disable Ar type Xo
384 .Op Cm input | output
386 Disables the specified type of encryption. If you
387 omit the input and output, both input and output
388 are disabled. To obtain a list of available
390 .Ic encrypt disable ?\&
392 .It Ic enable Ar type Xo
393 .Op Cm input | output
395 Enables the specified type of encryption. If you
396 omit input and output, both input and output are
397 enabled. To obtain a list of available types, use the
398 .Ic encrypt enable ?\&
401 This is the same as the
402 .Ic encrypt start input
405 This is the same as the
406 .Ic encrypt stop input
409 This is the same as the
410 .Ic encrypt start output
413 This is the same as the
414 .Ic encrypt stop output
416 .It Ic start Op Cm input | output
417 Attempts to start encryption. If you omit
421 both input and output are enabled. To
422 obtain a list of available types, use the
423 .Ic encrypt enable ?\&
426 Lists the current status of encryption.
427 .It Ic stop Op Cm input | output
428 Stops encryption. If you omit input and output,
429 encryption is on both input and output.
431 Sets the default type of encryption to be used
438 .It Ic environ Ar arguments ...
441 command is used to manipulate the
442 variables that may be sent through the
445 The initial set of variables is populated with the
446 contents of the following environment variables, if
448 .Ev USER , PRINTER , DISPLAY , TERM , COLUMNS , LINES.
449 Only the first three are exported, by default.
451 Valid arguments for the
455 .It Ic define Ar variable [value]
460 If value is empty, the value is taken from the environment variable.
461 Any variables defined by this command are automatically exported.
464 may be enclosed in single or double quotes so
465 that tabs and spaces may be included.
466 .It Ic undefine Ar variable
469 from the list of environment variables.
470 .It Ic export Ar variable
473 to be exported to the remote side.
474 .It Ic unexport Ar variable
477 to not be exported unless
478 explicitly asked for by the remote side.
480 List the current set of environment variables.
483 will be sent automatically,
484 other variables will only be sent if explicitly requested.
486 Prints out help information for the
493 option to the remote side.
494 This command is similar to a
496 command; however, if the remote side does not support the
498 option, nothing happens.
499 If, however, the remote side does support the
501 option, this command should cause the remote side to close the
504 If the remote side also supports the concept of
505 suspending a user's session for later reattachment,
506 the logout argument indicates that you
507 should terminate the session immediately.
510 is one of several options, depending on the state of the
513 The remote host is asked for permission to go into the requested mode.
514 If the remote host is capable of entering that mode, the requested
515 mode will be entered.
520 option, or, if the remote side does not understand the
522 option, then enter \*(Lqcharacter at a time\*(Rq mode.
526 option, or, if the remote side does not understand the
528 option, then attempt to enter \*(Lqold-line-by-line\*(Rq mode.
529 .It Ic isig Pq Ic \-isig
530 Attempt to enable (disable) the
535 This requires that the
538 .It Ic edit Pq Ic \-edit
539 Attempt to enable (disable) the
544 This requires that the
547 .It Ic softtabs Pq Ic \-softtabs
548 Attempt to enable (disable) the
553 This requires that the
556 .It Ic litecho Pq Ic \-litecho
557 Attempt to enable (disable) the
562 This requires that the
566 Prints out help information for the
573 .Op Oo Fl Oc Ns Ar port
575 Open a connection to the named host.
579 will attempt to contact a
581 server at the default port.
582 The host specification may be either a host name (see
584 an Internet address specified in the \*(Lqdot notation\*(Rq (see
586 or IPv6 host name or IPv6 coloned-hexadecimal addreess.
589 option may be used to specify the user name
590 to be passed to the remote system via the
593 When connecting to a non-standard port,
595 omits any automatic initiation of
597 options. When the port number is preceded by a minus sign,
598 the initial option negotiation is done.
599 After establishing a connection, the file
602 users home directory is opened. Lines beginning with a # are
603 comment lines. Blank lines are ignored. Lines that begin
604 without white space are the start of a machine entry. The
605 first thing on the line is the name of the machine that is
606 being connected to. The rest of the line, and successive
607 lines that begin with white space are assumed to be
609 commands and are processed as if they had been typed
618 An end of file (in command mode) will also close a session and exit.
619 .It Ic send Ar arguments
620 Sends one or more special character sequences to the remote host.
621 The following are the arguments which may be specified
622 (more than one argument may be specified at a time):
624 .Bl -tag -width escape
634 (Abort Output) sequence, which should cause the remote system to flush
644 sequence, to which the remote system may or may not choose to respond.
648 (Break) sequence, which may have significance to the remote
654 sequence, which should cause the remote system to erase the last character
660 sequence, which should cause the remote system to erase the line currently
675 escape character (initially \*(Lq^\*(Rq).
680 sequence, which likely has no significance to the remote system.
682 If the remote side supports the
686 will send the subnegotiation to request that the server send
687 its current option status.
691 (Interrupt Process) sequence, which should cause the remote
692 system to abort the currently running process.
707 This sequence causes the remote system to discard all previously typed
708 (but not yet read) input.
709 This sequence is sent as
712 data (and may not work if the remote system is a
715 it doesn't work, a lower case \*(Lqr\*(Rq may be echoed on the terminal).
725 can be either a decimal number between 0 and 255,
726 or a symbolic name for a specific
734 to print out help information, including
735 a list of known symbolic names.
737 Prints out help information for the
741 .It Ic set Ar argument value
742 .It Ic unset Ar argument value
745 command will set any one of a number of
747 variables to a specific value or to
751 turns off the function associated with
752 the variable, this is equivalent to using the
757 command will disable or set to
759 any of the specified functions.
760 The values of variables may be interrogated with the
763 The variables which may be set or unset, but not toggled, are
764 listed here. In addition, any of the variables for the
766 command may be explicitly set or unset using
772 .Bl -tag -width escape
776 is in localchars mode, or
778 is enabled, and the status character is typed, a
782 preceding) is sent to the
783 remote host. The initial value for the \*(LqAre You There\*(Rq
784 character is the terminal's status character.
786 This is the value (initially \*(Lq^E\*(Rq) which, when in
787 \*(Lqline by line\*(Rq mode, toggles between doing local echoing
788 of entered characters (for normal processing), and suppressing
789 echoing of entered characters (for entering, say, a password).
795 or \*(Lqold line by line\*(Rq mode, entering this character
796 as the first character on a line will cause this character to be
797 sent to the remote system.
798 The initial value of the eof character is taken to be the terminal's
813 is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
814 character is typed, a
820 is sent to the remote system.
821 The initial value for the erase character is taken to be
828 escape character (initially \*(Lq^[\*(Rq) which causes entry
831 command mode (when connected to a remote system).
843 character is typed, a
849 is sent to the remote host.
850 The initial value for the flush character is taken to be
861 characters that, when typed, cause partial lines to be
862 forwarded to the remote system. The initial value for
863 the forwarding characters are taken from the terminal's
864 eol and eol2 characters.
876 character is typed, a
882 is sent to the remote host.
883 The initial value for the interrupt character is taken to be
899 is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
900 character is typed, a
906 is sent to the remote system.
907 The initial value for the kill character is taken to be
916 or \*(Lqold line by line\*(Rq mode, then this character is taken to
920 The initial value for the lnext character is taken to be
935 character is typed, a
941 is sent to the remote host.
942 The initial value for the quit character is taken to be
951 or \*(Lqold line by line\*(Rq mode, then this character is taken to
955 The initial value for the reprint character is taken to be
960 This is the rlogin escape character.
963 escape character is ignored unless it is
964 preceded by this character at the beginning of a line.
965 This character, at the beginning of a line followed by
966 a "." closes the connection; when followed by a ^Z it
969 command. The initial state is to
975 .Dv TELNET TOGGLE-FLOW-CONTROL
976 option has been enabled,
977 then this character is taken to
981 The initial value for the start character is taken to be
987 .Dv TELNET TOGGLE-FLOW-CONTROL
988 option has been enabled,
989 then this character is taken to
993 The initial value for the stop character is taken to be
1006 character is typed, a
1012 is sent to the remote host.
1013 The initial value for the suspend character is taken to be
1018 This is the file to which the output, caused by
1024 will be written. If it is set to
1026 then tracing information will be written to standard output (the default).
1032 or \*(Lqold line by line\*(Rq mode, then this character is taken to
1036 The initial value for the worderase character is taken to be
1046 .It Ic opie Ar sequence challenge
1049 command computes a response to the OPIE challenge.
1053 command (Set Local Characters) is used to set
1054 or change the state of the special
1058 been enabled. Special characters are characters that get
1061 commands sequences (like
1065 or line editing characters (like
1069 By default, the local special characters are exported.
1072 Verify the current settings for the current special characters.
1073 The remote side is requested to send all the current special
1074 character settings, and if there are any discrepancies with
1075 the local side, the local side will switch to the remote value.
1077 Switch to the local defaults for the special characters. The
1078 local default characters are those of the local terminal at
1083 Switch to the remote defaults for the special characters.
1084 The remote default characters are those of the remote system
1085 at the time when the
1087 connection was established.
1089 Prints out help information for the
1094 Show the current status of
1096 This includes the peer one is connected to, as well
1097 as the current mode.
1098 .It Ic toggle Ar arguments ...
1103 various flags that control how
1106 These flags may be set explicitly to
1114 commands listed above.
1115 More than one argument may be specified.
1116 The state of these flags may be interrogated with the
1119 Valid arguments are:
1122 Turns on debugging information for the authentication code.
1134 characters are recognized (and transformed into
1140 refuses to display any data on the user's terminal
1141 until the remote system acknowledges (via a
1142 .Dv TELNET TIMING MARK
1144 that it has processed those
1147 The initial value for this toggle is
1149 if the terminal user had not
1150 done an "stty noflsh", otherwise
1157 option is negotiated, by
1158 default the actual encryption (decryption) of the data
1159 stream does not start automatically. The autoencrypt
1160 (autodecrypt) command states that encryption of the
1161 output (input) stream should be enabled as soon as
1164 If the remote side supports the
1165 .Dv TELNET AUTHENTICATION
1168 attempts to use it to perform automatic authentication. If the
1170 option is not supported, the user's login
1171 name are propagated through the
1174 This command is the same as specifying
1186 then when either the
1190 characters is typed (see
1192 above for descriptions of the
1196 characters), the resulting
1198 sequence sent is followed by the
1203 cause the remote system to begin throwing away all previously
1204 typed input until both of the
1206 sequences have been read and acted upon.
1207 The initial value of this toggle is
1210 Enable or disable the
1212 option on both input and output.
1214 Enable or disable the
1218 Enable or disable the
1224 then carriage returns will be sent as
1228 then carriage returns will be send as
1230 The initial value for this toggle is
1233 Toggle carriage return mode.
1234 When this mode is enabled, most carriage return characters received from
1235 the remote host will be mapped into a carriage return followed by
1237 This mode does not affect those characters typed by the user, only
1238 those received from the remote host.
1239 This mode is not very useful unless the remote host
1240 only sends carriage return, but never line feed.
1241 The initial value for this toggle is
1244 Toggles socket level debugging (useful only to the
1246 The initial value for this toggle is
1249 Turns on debugging information for the encryption code.
1262 above) are recognized locally, and transformed into (hopefully) appropriate
1275 The initial value for this toggle is
1277 in \*(Lqold line by line\*(Rq mode,
1280 in \*(Lqcharacter at a time\*(Rq mode.
1283 option is enabled, the value of
1285 is ignored, and assumed to always be
1289 has ever been enabled, then
1305 Toggles the display of all network data (in hexadecimal format).
1306 The initial value for this toggle is
1309 Toggles the display of some internal
1311 protocol processing (having to do with
1314 The initial value for this toggle is
1319 toggle is enabled, if
1321 is enabled the output from the
1323 command will be formatted in a more user readable format.
1324 Spaces are put between each character in the output, and the
1327 escape sequence is preceded by a '*' to aid in locating them.
1329 When the skiprc toggle is
1332 skips the reading of the
1334 file in the users home
1335 directory when connections are opened. The initial
1336 value for this toggle is
1339 Toggles the display of all terminal data (in hexadecimal format).
1340 The initial value for this toggle is
1342 .It Ic verbose_encrypt
1348 prints out a message each time encryption is enabled or
1349 disabled. The initial value for this toggle is
1359 This command only works when the user is using the
1361 .It Ic \&! Op Ar command
1362 Execute a single command in a subshell on the local
1365 is omitted, then an interactive
1366 subshell is invoked.
1367 .It Ic ?\& Op Ar command
1368 Get help. With no arguments,
1370 prints a help summary.
1375 will print the help information for just that command.
1385 environment variables.
1386 Other environment variables may be propagated
1387 to the other side via the
1397 .Bl -tag -width ~/.telnetrc -compact
1399 user customized telnet startup values
1407 IPv6 support was added by WIDE/KAME project.
1409 On some remote systems, echo has to be turned off manually when in
1410 \*(Lqold line by line\*(Rq mode.
1412 In \*(Lqold line by line\*(Rq mode or
1416 character is only recognized (and sent to the remote system)
1417 when it is the first character on a line.