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
35 .Dd September 18, 2006
40 .Nd user interface to the
45 .Op Fl 468EFKLNacdfruxy
49 .Op Fl e Ar escapechar
62 is used to communicate with another host using the
67 is invoked without the
69 argument, it enters command mode,
70 indicated by its prompt
72 In this mode, it accepts and executes the commands listed below.
73 If it is invoked with arguments, it performs an
75 command with those arguments.
78 .Bl -tag -width indent
82 to use IPv4 addresses only.
86 to use IPv6 addresses only.
88 Specifies an 8-bit data path.
89 This causes an attempt to
92 option on both input and output.
97 Stops any character from being recognized as an escape character.
99 If Kerberos V5 authentication is being used, the
101 option allows the local credentials to be forwarded
102 to the remote system, including any credentials that
103 have already been forwarded into the local environment.
105 Specifies no automatic login to the remote system.
107 Specifies an 8-bit data path on output.
110 option to be negotiated on output.
112 Prevents IP address to name lookup when destination host is given
115 Sets the IP type-of-service (TOS) option for the telnet
116 connection to the value
118 which can be a numeric TOS value
119 or, on systems that support it, a symbolic
120 TOS name found in the
126 type of authentication.
128 Attempt automatic login.
129 This is now the default, so this option is ignored.
130 Currently, this sends the user name via the
135 option if supported by the remote system.
136 The name used is that of the current user as returned by
138 if it agrees with the current user ID,
139 otherwise it is the name associated with the user ID.
141 Disables the reading of the user's
146 command on this man page.)
148 Sets the initial value of the
152 .It Fl e Ar escapechar
160 there will be no escape character.
162 If Kerberos V5 authentication is being used, the
164 option allows the local credentials to be forwarded to the remote system.
166 If Kerberos authentication is being used, the
170 obtain tickets for the remote host in
173 instead of the remote host's realm, as determined by
174 .Xr krb_realmofhost 3 .
176 When connecting to the remote system, if the remote system
181 will be sent to the remote system as the value for the variable
183 This option implies the
186 This option may also be used with the
189 .It Fl n Ar tracefile
192 for recording trace information.
197 Specifies a user interface similar to
200 mode, the escape character is set to the tilde (~) character,
201 unless modified by the
205 Set the source IP address for the
209 which can be an IP address or a host name.
215 addresses only (e.g.,
217 domain sockets, accessed with a file path).
219 Turns on encryption of the data stream if possible.
220 This is now the default, so this option is ignored.
222 Suppresses encryption of the data stream.
224 Indicates the official name, an alias, or the Internet address
231 establishes a connection to the corresponding named socket.
233 Indicates a port number (address of an application).
235 not specified, the default
240 When in rlogin mode, a line of the form ~.\& disconnects from the
241 remote host; ~ is the
244 Similarly, the line ~^Z suspends the
247 The line ~^] escapes to the normal
251 Once a connection has been opened,
253 will attempt to enable the
258 will revert to one of two input modes:
259 either \*(Lqcharacter at a time\*(Rq
260 or \*(Lqold line by line\*(Rq
261 depending on what the remote system supports.
265 is enabled, character processing is done on the
266 local system, under the control of the remote system.
268 editing or character echoing is to be disabled, the remote system
269 will relay that information.
270 The remote system will also relay
271 changes to any special characters that happen on the remote
272 system, so that they can take effect on the local system.
274 In \*(Lqcharacter at a time\*(Rq mode, most
275 text typed is immediately sent to the remote host for processing.
277 In \*(Lqold line by line\*(Rq mode, all text is echoed locally,
278 and (normally) only completed lines are sent to the remote host.
279 The \*(Lqlocal echo character\*(Rq (initially \*(Lq^E\*(Rq) may be used
280 to turn off and on the local echo
281 (this would mostly be used to enter passwords
282 without the password being echoed).
286 option is enabled, or if the
290 (the default for \*(Lqold line by line\*(Rq; see below),
296 characters are trapped locally, and sent as
298 protocol sequences to the remote side.
301 has ever been enabled, then the user's
314 There are options (see
321 which cause this action to flush subsequent output to the terminal
322 (until the remote host acknowledges the
324 sequence) and flush previous terminal input
330 While connected to a remote host,
332 command mode may be entered by typing the
334 \*(Lqescape character\*(Rq (initially \*(Lq^]\*(Rq).
335 When in command mode, the normal terminal editing conventions are available.
339 commands are available.
340 Only enough of each command to uniquely identify it need be typed
341 (this is also true for arguments to the
352 .Bl -tag -width "mode type"
353 .It Ic auth Ar argument ...
354 The auth command manipulates the information sent through the
355 .Dv TELNET AUTHENTICATE
357 Valid arguments for the
360 .Bl -tag -width "disable type"
361 .It Ic disable Ar type
362 Disables the specified type of authentication.
364 obtain a list of available types, use the
367 .It Ic enable Ar type
368 Enables the specified type of authentication.
370 obtain a list of available types, use the
374 Lists the current status of the various types of
380 session and return to command mode.
381 .It Ic display Ar argument ...
382 Displays all, or some, of the
387 .It Ic encrypt Ar argument ...
388 The encrypt command manipulates the information sent through the
392 Valid arguments for the
396 .It Ic disable Ar type Xo
397 .Op Cm input | output
399 Disables the specified type of encryption.
401 omit the input and output, both input and output
403 To obtain a list of available
405 .Ic encrypt disable ?\&
407 .It Ic enable Ar type Xo
408 .Op Cm input | output
410 Enables the specified type of encryption.
412 omit input and output, both input and output are
414 To obtain a list of available types, use the
415 .Ic encrypt enable ?\&
418 This is the same as the
419 .Ic encrypt start input
422 This is the same as the
423 .Ic encrypt stop input
426 This is the same as the
427 .Ic encrypt start output
430 This is the same as the
431 .Ic encrypt stop output
433 .It Ic start Op Cm input | output
434 Attempts to start encryption.
439 both input and output are enabled.
441 obtain a list of available types, use the
442 .Ic encrypt enable ?\&
445 Lists the current status of encryption.
446 .It Ic stop Op Cm input | output
448 If you omit input and output,
449 encryption is on both input and output.
451 Sets the default type of encryption to be used
458 .It Ic environ Ar arguments ...
461 command is used to manipulate the
462 variables that may be sent through the
465 The initial set of variables is taken from the users
466 environment, with only the
470 variables being exported by default.
473 variable is also exported if the
479 Valid arguments for the
483 .It Ic define Ar variable value
488 Any variables defined by this command are automatically exported.
491 may be enclosed in single or double quotes so
492 that tabs and spaces may be included.
493 .It Ic undefine Ar variable
496 from the list of environment variables.
497 .It Ic export Ar variable
500 to be exported to the remote side.
501 .It Ic unexport Ar variable
504 to not be exported unless
505 explicitly asked for by the remote side.
507 List the current set of environment variables.
510 will be sent automatically,
511 other variables will only be sent if explicitly requested.
513 Prints out help information for the
520 option to the remote side.
521 This command is similar to a
523 command; however, if the remote side does not support the
525 option, nothing happens.
526 If, however, the remote side does support the
528 option, this command should cause the remote side to close the
531 If the remote side also supports the concept of
532 suspending a user's session for later reattachment,
533 the logout argument indicates that you
534 should terminate the session immediately.
537 is one of several options, depending on the state of the
540 The remote host is asked for permission to go into the requested mode.
541 If the remote host is capable of entering that mode, the requested
542 mode will be entered.
547 option, or, if the remote side does not understand the
549 option, then enter \*(Lqcharacter at a time\*(Rq mode.
553 option, or, if the remote side does not understand the
555 option, then attempt to enter \*(Lqold-line-by-line\*(Rq mode.
556 .It Ic isig Pq Ic \-isig
557 Attempt to enable (disable) the
562 This requires that the
565 .It Ic edit Pq Ic \-edit
566 Attempt to enable (disable) the
571 This requires that the
574 .It Ic softtabs Pq Ic \-softtabs
575 Attempt to enable (disable) the
580 This requires that the
583 .It Ic litecho Pq Ic \-litecho
584 Attempt to enable (disable) the
589 This requires that the
593 Prints out help information for the
601 .Op Oo Fl /+ Oc Ns Ar port
603 Open a connection to the named host.
607 will attempt to contact a
609 server at the default port.
610 The host specification may be either a host name (see
612 an Internet address specified in the \*(Lqdot notation\*(Rq (see
614 or IPv6 host name or IPv6 coloned-hexadecimal addreess.
617 option may be used to specify the user name
618 to be passed to the remote system via the
621 When connecting to a non-standard port,
623 omits any automatic initiation of
626 When the port number is preceded by a minus sign,
627 the initial option negotiation is done.
628 When, however, the port number
629 is preceded by a plus sign,
630 any option negotiation and understanding is prohibited,
631 making telnet dumb client for POP3/SMTP/NNTP/HTTP-like
632 protocols with any data including
634 IAC character (0xff).
635 After establishing a connection, the file
638 users home directory is opened.
639 Lines beginning with a # are
641 Blank lines are ignored.
643 without white space are the start of a machine entry.
645 first thing on the line is the name of the machine that is
647 It may be the hostname or numeric address specified as the argument
649 the canonical name of that string as determined by
653 indicating all hosts.
654 The rest of the line, and successive
655 lines that begin with white space are assumed to be
657 commands and are processed as if they had been typed
666 An end of file (in command mode) will also close a session and exit.
667 .It Ic send Ar arguments
668 Sends one or more special character sequences to the remote host.
669 The following are the arguments which may be specified
670 (more than one argument may be specified at a time):
672 .Bl -tag -width escape
682 (Abort Output) sequence, which should cause the remote system to flush
692 sequence, to which the remote system may or may not choose to respond.
696 (Break) sequence, which may have significance to the remote
702 sequence, which should cause the remote system to erase the last character
708 sequence, which should cause the remote system to erase the line currently
723 escape character (initially \*(Lq^\*(Rq).
728 sequence, which likely has no significance to the remote system.
730 If the remote side supports the
734 will send the subnegotiation to request that the server send
735 its current option status.
739 (Interrupt Process) sequence, which should cause the remote
740 system to abort the currently running process.
755 This sequence causes the remote system to discard all previously typed
756 (but not yet read) input.
757 This sequence is sent as
760 data (and may not work if the remote system is a
763 it doesn't work, a lower case \*(Lqr\*(Rq may be echoed on the terminal).
773 can be either a decimal number between 0 and 255,
774 or a symbolic name for a specific
782 to print out help information, including
783 a list of known symbolic names.
785 Prints out help information for the
789 .It Ic set Ar argument value
790 .It Ic unset Ar argument value
793 command will set any one of a number of
795 variables to a specific value or to
799 turns off the function associated with
800 the variable, this is equivalent to using the
805 command will disable or set to
807 any of the specified functions.
808 The values of variables may be interrogated with the
811 The variables which may be set or unset, but not toggled, are
813 In addition, any of the variables for the
815 command may be explicitly set or unset using
821 .Bl -tag -width escape
825 is in localchars mode, or
827 is enabled, and the status character is typed, a
831 preceding) is sent to the
833 The initial value for the \*(LqAre You There\*(Rq
834 character is the terminal's status character.
836 This is the value (initially \*(Lq^E\*(Rq) which, when in
837 \*(Lqline by line\*(Rq mode, toggles between doing local echoing
838 of entered characters (for normal processing), and suppressing
839 echoing of entered characters (for entering, say, a password).
845 or \*(Lqold line by line\*(Rq mode, entering this character
846 as the first character on a line will cause this character to be
847 sent to the remote system.
848 The initial value of the eof character is taken to be the terminal's
863 is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
864 character is typed, a
870 is sent to the remote system.
871 The initial value for the erase character is taken to be
878 escape character (initially \*(Lq^[\*(Rq) which causes entry
881 command mode (when connected to a remote system).
893 character is typed, a
899 is sent to the remote host.
900 The initial value for the flush character is taken to be
911 characters that, when typed, cause partial lines to be
912 forwarded to the remote system.
913 The initial value for
914 the forwarding characters are taken from the terminal's
915 eol and eol2 characters.
927 character is typed, a
933 is sent to the remote host.
934 The initial value for the interrupt character is taken to be
950 is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
951 character is typed, a
957 is sent to the remote system.
958 The initial value for the kill character is taken to be
967 or \*(Lqold line by line\*(Rq mode, then this character is taken to
971 The initial value for the lnext character is taken to be
986 character is typed, a
992 is sent to the remote host.
993 The initial value for the quit character is taken to be
1002 or \*(Lqold line by line\*(Rq mode, then this character is taken to
1006 The initial value for the reprint character is taken to be
1011 This is the rlogin escape character.
1014 escape character is ignored unless it is
1015 preceded by this character at the beginning of a line.
1016 This character, at the beginning of a line followed by
1017 a "." closes the connection; when followed by a ^Z it
1021 The initial state is to
1027 .Dv TELNET TOGGLE-FLOW-CONTROL
1028 option has been enabled,
1029 then this character is taken to
1033 The initial value for the start character is taken to be
1039 .Dv TELNET TOGGLE-FLOW-CONTROL
1040 option has been enabled,
1041 then this character is taken to
1045 The initial value for the stop character is taken to be
1058 character is typed, a
1064 is sent to the remote host.
1065 The initial value for the suspend character is taken to be
1070 This is the file to which the output, caused by
1079 then tracing information will be written to standard output (the default).
1085 or \*(Lqold line by line\*(Rq mode, then this character is taken to
1089 The initial value for the worderase character is taken to be
1099 .It Ic opie Ar sequence challenge
1102 command computes a response to the OPIE challenge.
1106 command (Set Local Characters) is used to set
1107 or change the state of the special
1112 Special characters are characters that get
1115 commands sequences (like
1119 or line editing characters (like
1123 By default, the local special characters are exported.
1126 Verify the current settings for the current special characters.
1127 The remote side is requested to send all the current special
1128 character settings, and if there are any discrepancies with
1129 the local side, the local side will switch to the remote value.
1131 Switch to the local defaults for the special characters.
1133 local default characters are those of the local terminal at
1138 Switch to the remote defaults for the special characters.
1139 The remote default characters are those of the remote system
1140 at the time when the
1142 connection was established.
1144 Prints out help information for the
1149 Show the current status of
1151 This includes the peer one is connected to, as well
1152 as the current mode.
1153 .It Ic toggle Ar arguments ...
1158 various flags that control how
1161 These flags may be set explicitly to
1169 commands listed above.
1170 More than one argument may be specified.
1171 The state of these flags may be interrogated with the
1174 Valid arguments are:
1177 Turns on debugging information for the authentication code.
1189 characters are recognized (and transformed into
1195 refuses to display any data on the user's terminal
1196 until the remote system acknowledges (via a
1197 .Dv TELNET TIMING MARK
1199 that it has processed those
1202 The initial value for this toggle is
1204 if the terminal user had not
1205 done an "stty noflsh", otherwise
1212 option is negotiated, by
1213 default the actual encryption (decryption) of the data
1214 stream does not start automatically.
1216 (autodecrypt) command states that encryption of the
1217 output (input) stream should be enabled as soon as
1220 If the remote side supports the
1221 .Dv TELNET AUTHENTICATION
1224 attempts to use it to perform automatic authentication.
1227 option is not supported, the user's login
1228 name are propagated through the
1231 This command is the same as specifying
1243 then when either the
1247 characters is typed (see
1249 above for descriptions of the
1253 characters), the resulting
1255 sequence sent is followed by the
1260 cause the remote system to begin throwing away all previously
1261 typed input until both of the
1263 sequences have been read and acted upon.
1264 The initial value of this toggle is
1267 Enable or disable the
1269 option on both input and output.
1271 Enable or disable the
1275 Enable or disable the
1281 then carriage returns will be sent as
1285 then carriage returns will be send as
1287 The initial value for this toggle is
1290 Toggle carriage return mode.
1291 When this mode is enabled, most carriage return characters received from
1292 the remote host will be mapped into a carriage return followed by
1294 This mode does not affect those characters typed by the user, only
1295 those received from the remote host.
1296 This mode is not very useful unless the remote host
1297 only sends carriage return, but never line feed.
1298 The initial value for this toggle is
1301 Toggles socket level debugging (useful only to the
1303 The initial value for this toggle is
1306 Turns on debugging information for the encryption code.
1319 above) are recognized locally, and transformed into (hopefully) appropriate
1332 The initial value for this toggle is
1334 in \*(Lqold line by line\*(Rq mode,
1337 in \*(Lqcharacter at a time\*(Rq mode.
1340 option is enabled, the value of
1342 is ignored, and assumed to always be
1346 has ever been enabled, then
1362 Toggles the display of all network data (in hexadecimal format).
1363 The initial value for this toggle is
1366 Toggles the display of some internal
1368 protocol processing (having to do with
1371 The initial value for this toggle is
1376 toggle is enabled, if
1378 is enabled the output from the
1380 command will be formatted in a more user readable format.
1381 Spaces are put between each character in the output, and the
1384 escape sequence is preceded by a '*' to aid in locating them.
1386 When the skiprc toggle is
1389 skips the reading of the
1391 file in the users home
1392 directory when connections are opened.
1394 value for this toggle is
1397 Toggles the display of all terminal data (in hexadecimal format).
1398 The initial value for this toggle is
1400 .It Ic verbose_encrypt
1406 prints out a message each time encryption is enabled or
1408 The initial value for this toggle is
1418 This command only works when the user is using the
1420 .It Ic \&! Op Ar command
1421 Execute a single command in a subshell on the local
1425 is omitted, then an interactive
1426 subshell is invoked.
1427 .It Ic ?\& Op Ar command
1431 prints a help summary.
1436 will print the help information for just that command.
1446 environment variables.
1447 Other environment variables may be propagated
1448 to the other side via the
1452 .Bl -tag -width ~/.telnetrc -compact
1454 user customized telnet startup values
1468 IPv6 support was added by WIDE/KAME project.
1470 On some remote systems, echo has to be turned off manually when in
1471 \*(Lqold line by line\*(Rq mode.
1473 In \*(Lqold line by line\*(Rq mode or
1477 character is only recognized (and sent to the remote system)
1478 when it is the first character on a line.