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. Neither the name of the University nor the names of its contributors
13 .\" may be used to endorse or promote products derived from this software
14 .\" without specific prior written permission.
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" @(#)telnet.1 8.6 (Berkeley) 6/1/94
29 .\" $FreeBSD: src/crypto/telnet/telnet/telnet.1,v 1.4.2.9 2002/04/13 10:59:08 markm Exp $
36 .Nd user interface to the
41 .Op Fl 468EFKLNacdfruxy
44 .Op Fl e Ar escapechar
57 is used to communicate with another host using the
62 is invoked without the
64 argument, it enters command mode,
65 indicated by its prompt
67 In this mode, it accepts and executes the commands listed below.
68 If it is invoked with arguments, it performs an
70 command with those arguments.
73 .Bl -tag -width indent
77 to use IPv4 addresses only.
81 to use IPv6 addresses only.
83 Specifies an 8-bit data path. This causes an attempt to
86 option on both input and output.
88 Stops any character from being recognized as an escape character.
90 If Kerberos V5 authentication is being used, the
92 option allows the local credentials to be forwarded
93 to the remote system, including any credentials that
94 have already been forwarded into the local environment.
96 Specifies no automatic login to the remote system.
97 This is now the default, so this option is ignored.
99 Specifies an 8-bit data path on output. This causes the
101 option to be negotiated on output.
103 Prevents IP address to name lookup when destination host is given
106 Sets the IP type-of-service (TOS) option for the telnet
107 connection to the value
109 which can be a numeric TOS value
110 or, on systems that support it, a symbolic
111 TOS name found in the
117 type of authentication.
119 Attempt automatic login.
120 Currently, this sends the user name via the
125 option if supported by the remote system.
126 The name used is that of the current user as returned by
128 if it agrees with the current user ID,
129 otherwise it is the name associated with the user ID.
131 Disables the reading of the user's
135 command on this man page.)
137 Sets the initial value of the
141 .It Fl e Ar escapechar
149 there will be no escape character.
151 If Kerberos V5 authentication is being used, the
153 option allows the local credentials to be forwarded to the remote system.
155 If Kerberos authentication is being used, the
159 obtain tickets for the remote host in
162 instead of the remote host's realm, as determined by
163 .Xr krb_realmofhost 3 .
165 When connecting to the remote system, if the remote system
170 will be sent to the remote system as the value for the variable
172 This option implies the
175 This option may also be used with the
178 .It Fl n Ar tracefile
181 for recording trace information.
186 Specifies a user interface similar to
189 mode, the escape character is set to the tilde (~) character,
190 unless modified by the
194 Set the source IP address for the
198 which can be an IP address or a host name.
204 addresses only (e.g.,
206 domain sockets, accessed with a file path).
208 Turns on encryption of the data stream if possible.
209 This is now the default, so this option is ignored.
211 Suppresses encryption of the data stream.
213 Indicates the official name, an alias, or the Internet address
220 establishes a connection to the corresponding named socket.
222 Indicates a port number (address of an application). If a number is
223 not specified, the default
228 When in rlogin mode, a line of the form ~. disconnects from the
229 remote host; ~ is the
232 Similarly, the line ~^Z suspends the
235 The line ~^] escapes to the normal
239 Once a connection has been opened,
241 will attempt to enable the
246 will revert to one of two input modes:
247 either \*(Lqcharacter at a time\*(Rq
248 or \*(Lqold line by line\*(Rq
249 depending on what the remote system supports.
253 is enabled, character processing is done on the
254 local system, under the control of the remote system. When input
255 editing or character echoing is to be disabled, the remote system
256 will relay that information. The remote system will also relay
257 changes to any special characters that happen on the remote
258 system, so that they can take effect on the local system.
260 In \*(Lqcharacter at a time\*(Rq mode, most
261 text typed is immediately sent to the remote host for processing.
263 In \*(Lqold line by line\*(Rq mode, all text is echoed locally,
264 and (normally) only completed lines are sent to the remote host.
265 The \*(Lqlocal echo character\*(Rq (initially \*(Lq^E\*(Rq) may be used
266 to turn off and on the local echo
267 (this would mostly be used to enter passwords
268 without the password being echoed).
272 option is enabled, or if the
276 (the default for \*(Lqold line by line\*(Rq; see below),
282 characters are trapped locally, and sent as
284 protocol sequences to the remote side.
287 has ever been enabled, then the user's
300 There are options (see
307 which cause this action to flush subsequent output to the terminal
308 (until the remote host acknowledges the
310 sequence) and flush previous terminal input
316 While connected to a remote host,
318 command mode may be entered by typing the
320 \*(Lqescape character\*(Rq (initially \*(Lq^]\*(Rq).
321 When in command mode, the normal terminal editing conventions are available.
325 commands are available.
326 Only enough of each command to uniquely identify it need be typed
327 (this is also true for arguments to the
337 .Bl -tag -width "mode type"
338 .It Ic auth Ar argument ...
339 The auth command manipulates the information sent through the
340 .Dv TELNET AUTHENTICATE
341 option. Valid arguments for the
344 .Bl -tag -width "disable type"
345 .It Ic disable Ar type
346 Disables the specified type of authentication. To
347 obtain a list of available types, use the
350 .It Ic enable Ar type
351 Enables the specified type of authentication. To
352 obtain a list of available types, use the
356 Lists the current status of the various types of
362 session and return to command mode.
363 .It Ic display Ar argument ...
364 Displays all, or some, of the
369 .It Ic encrypt Ar argument ...
370 The encrypt command manipulates the information sent through the
374 Valid arguments for the
378 .It Ic disable Ar type Xo
379 .Op Cm input | output
381 Disables the specified type of encryption. If you
382 omit the input and output, both input and output
383 are disabled. To obtain a list of available
385 .Ic encrypt disable ?\&
387 .It Ic enable Ar type Xo
388 .Op Cm input | output
390 Enables the specified type of encryption. If you
391 omit input and output, both input and output are
392 enabled. To obtain a list of available types, use the
393 .Ic encrypt enable ?\&
396 This is the same as the
397 .Ic encrypt start input
400 This is the same as the
401 .Ic encrypt stop input
404 This is the same as the
405 .Ic encrypt start output
408 This is the same as the
409 .Ic encrypt stop output
411 .It Ic start Op Cm input | output
412 Attempts to start encryption. If you omit
416 both input and output are enabled. To
417 obtain a list of available types, use the
418 .Ic encrypt enable ?\&
421 Lists the current status of encryption.
422 .It Ic stop Op Cm input | output
423 Stops encryption. If you omit input and output,
424 encryption is on both input and output.
426 Sets the default type of encryption to be used
433 .It Ic environ Ar arguments ...
436 command is used to manipulate the
437 variables that may be sent through the
440 The initial set of variables is taken from the users
441 environment, with only the
445 variables being exported by default.
448 variable is also exported if the
454 Valid arguments for the
458 .It Ic define Ar variable value
463 Any variables defined by this command are automatically exported.
466 may be enclosed in single or double quotes so
467 that tabs and spaces may be included.
468 .It Ic undefine Ar variable
471 from the list of environment variables.
472 .It Ic export Ar variable
475 to be exported to the remote side.
476 .It Ic unexport Ar variable
479 to not be exported unless
480 explicitly asked for by the remote side.
482 List the current set of environment variables.
485 will be sent automatically,
486 other variables will only be sent if explicitly requested.
488 Prints out help information for the
495 option to the remote side.
496 This command is similar to a
498 command; however, if the remote side does not support the
500 option, nothing happens.
501 If, however, the remote side does support the
503 option, this command should cause the remote side to close the
506 If the remote side also supports the concept of
507 suspending a user's session for later reattachment,
508 the logout argument indicates that you
509 should terminate the session immediately.
512 is one of several options, depending on the state of the
515 The remote host is asked for permission to go into the requested mode.
516 If the remote host is capable of entering that mode, the requested
517 mode will be entered.
522 option, or, if the remote side does not understand the
524 option, then enter \*(Lqcharacter at a time\*(Rq mode.
528 option, or, if the remote side does not understand the
530 option, then attempt to enter \*(Lqold-line-by-line\*(Rq mode.
531 .It Ic isig Pq Ic \-isig
532 Attempt to enable (disable) the
537 This requires that the
540 .It Ic edit Pq Ic \-edit
541 Attempt to enable (disable) the
546 This requires that the
549 .It Ic softtabs Pq Ic \-softtabs
550 Attempt to enable (disable) the
555 This requires that the
558 .It Ic litecho Pq Ic \-litecho
559 Attempt to enable (disable) the
564 This requires that the
568 Prints out help information for the
575 .Op Oo Fl Oc Ns Ar port
577 Open a connection to the named host.
581 will attempt to contact a
583 server at the default port.
584 The host specification may be either a host name (see
586 an Internet address specified in the \*(Lqdot notation\*(Rq (see
588 or IPv6 host name or IPv6 coloned-hexadecimal address.
591 option may be used to specify the user name
592 to be passed to the remote system via the
595 When connecting to a non-standard port,
597 omits any automatic initiation of
599 options. When the port number is preceded by a minus sign,
600 the initial option negotiation is done.
601 After establishing a connection, the file
604 users home directory is opened. Lines beginning with a # are
605 comment lines. Blank lines are ignored. Lines that begin
606 without white space are the start of a machine entry. The
607 first thing on the line is the name of the machine that is
608 being connected to. The rest of the line, and successive
609 lines that begin with white space are assumed to be
611 commands and are processed as if they had been typed
620 An end of file (in command mode) will also close a session and exit.
621 .It Ic send Ar arguments
622 Sends one or more special character sequences to the remote host.
623 The following are the arguments which may be specified
624 (more than one argument may be specified at a time):
625 .Bl -tag -width escape
635 (Abort Output) sequence, which should cause the remote system to flush
645 sequence, to which the remote system may or may not choose to respond.
649 (Break) sequence, which may have significance to the remote
655 sequence, which should cause the remote system to erase the last character
661 sequence, which should cause the remote system to erase the line currently
676 escape character (initially \*(Lq^\*(Rq).
681 sequence, which likely has no significance to the remote system.
683 If the remote side supports the
687 will send the subnegotiation to request that the server send
688 its current option status.
692 (Interrupt Process) sequence, which should cause the remote
693 system to abort the currently running process.
708 This sequence causes the remote system to discard all previously typed
709 (but not yet read) input.
710 This sequence is sent as
713 data (and may not work if the remote system is a
716 it doesn't work, a lower case \*(Lqr\*(Rq may be echoed on the terminal).
726 can be either a decimal number between 0 and 255,
727 or a symbolic name for a specific
735 to print out help information, including
736 a list of known symbolic names.
738 Prints out help information for the
742 .It Ic set Ar argument value
743 .It Ic unset Ar argument value
746 command will set any one of a number of
748 variables to a specific value or to
752 turns off the function associated with
753 the variable, this is equivalent to using the
758 command will disable or set to
760 any of the specified functions.
761 The values of variables may be interrogated with the
764 The variables which may be set or unset, but not toggled, are
765 listed here. In addition, any of the variables for the
767 command may be explicitly set or unset using
773 .Bl -tag -width escape
777 is in localchars mode, or
779 is enabled, and the status character is typed, a
783 preceding) is sent to the
784 remote host. The initial value for the \*(LqAre You There\*(Rq
785 character is the terminal's status character.
787 This is the value (initially \*(Lq^E\*(Rq) which, when in
788 \*(Lqline by line\*(Rq mode, toggles between doing local echoing
789 of entered characters (for normal processing), and suppressing
790 echoing of entered characters (for entering, say, a password).
796 or \*(Lqold line by line\*(Rq mode, entering this character
797 as the first character on a line will cause this character to be
798 sent to the remote system.
799 The initial value of the eof character is taken to be the terminal's
814 is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
815 character is typed, a
821 is sent to the remote system.
822 The initial value for the erase character is taken to be
829 escape character (initially \*(Lq^[\*(Rq) which causes entry
832 command mode (when connected to a remote system).
844 character is typed, a
850 is sent to the remote host.
851 The initial value for the flush character is taken to be
862 characters that, when typed, cause partial lines to be
863 forwarded to the remote system. The initial value for
864 the forwarding characters are taken from the terminal's
865 eol and eol2 characters.
877 character is typed, a
883 is sent to the remote host.
884 The initial value for the interrupt character is taken to be
900 is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
901 character is typed, a
907 is sent to the remote system.
908 The initial value for the kill character is taken to be
917 or \*(Lqold line by line\*(Rq mode, then this character is taken to
921 The initial value for the lnext character is taken to be
936 character is typed, a
942 is sent to the remote host.
943 The initial value for the quit character is taken to be
952 or \*(Lqold line by line\*(Rq mode, then this character is taken to
956 The initial value for the reprint character is taken to be
961 This is the rlogin escape character.
964 escape character is ignored unless it is
965 preceded by this character at the beginning of a line.
966 This character, at the beginning of a line followed by
967 a "." closes the connection; when followed by a ^Z it
970 command. The initial state is to
976 .Dv TELNET TOGGLE-FLOW-CONTROL
977 option has been enabled,
978 then this character is taken to
982 The initial value for the start character is taken to be
988 .Dv TELNET TOGGLE-FLOW-CONTROL
989 option has been enabled,
990 then this character is taken to
994 The initial value for the stop character is taken to be
1007 character is typed, a
1013 is sent to the remote host.
1014 The initial value for the suspend character is taken to be
1019 This is the file to which the output, caused by
1025 will be written. If it is set to
1027 then tracing information will be written to standard output (the default).
1033 or \*(Lqold line by line\*(Rq mode, then this character is taken to
1037 The initial value for the worderase character is taken to be
1047 .It Ic opie Ar sequence challenge
1050 command computes a response to the OPIE challenge.
1054 command (Set Local Characters) is used to set
1055 or change the state of the special
1059 been enabled. Special characters are characters that get
1062 commands sequences (like
1066 or line editing characters (like
1070 By default, the local special characters are exported.
1073 Verify the current settings for the current special characters.
1074 The remote side is requested to send all the current special
1075 character settings, and if there are any discrepancies with
1076 the local side, the local side will switch to the remote value.
1078 Switch to the local defaults for the special characters. The
1079 local default characters are those of the local terminal at
1084 Switch to the remote defaults for the special characters.
1085 The remote default characters are those of the remote system
1086 at the time when the
1088 connection was established.
1090 Prints out help information for the
1095 Show the current status of
1097 This includes the peer one is connected to, as well
1098 as the current mode.
1099 .It Ic toggle Ar arguments ...
1104 various flags that control how
1107 These flags may be set explicitly to
1115 commands listed above.
1116 More than one argument may be specified.
1117 The state of these flags may be interrogated with the
1120 Valid arguments are:
1123 Turns on debugging information for the authentication code.
1135 characters are recognized (and transformed into
1141 refuses to display any data on the user's terminal
1142 until the remote system acknowledges (via a
1143 .Dv TELNET TIMING MARK
1145 that it has processed those
1148 The initial value for this toggle is
1150 if the terminal user had not
1151 done an "stty noflsh", otherwise
1158 option is negotiated, by
1159 default the actual encryption (decryption) of the data
1160 stream does not start automatically. The autoencrypt
1161 (autodecrypt) command states that encryption of the
1162 output (input) stream should be enabled as soon as
1165 If the remote side supports the
1166 .Dv TELNET AUTHENTICATION
1169 attempts to use it to perform automatic authentication. If the
1171 option is not supported, the user's login
1172 name are propagated through the
1175 This command is the same as specifying
1187 then when either the
1191 characters is typed (see
1193 above for descriptions of the
1197 characters), the resulting
1199 sequence sent is followed by the
1204 cause the remote system to begin throwing away all previously
1205 typed input until both of the
1207 sequences have been read and acted upon.
1208 The initial value of this toggle is
1211 Enable or disable the
1213 option on both input and output.
1215 Enable or disable the
1219 Enable or disable the
1225 then carriage returns will be sent as
1229 then carriage returns will be send as
1231 The initial value for this toggle is
1234 Toggle carriage return mode.
1235 When this mode is enabled, most carriage return characters received from
1236 the remote host will be mapped into a carriage return followed by
1238 This mode does not affect those characters typed by the user, only
1239 those received from the remote host.
1240 This mode is not very useful unless the remote host
1241 only sends carriage return, but never line feed.
1242 The initial value for this toggle is
1245 Toggles socket level debugging (useful only to the
1247 The initial value for this toggle is
1250 Turns on debugging information for the encryption code.
1263 above) are recognized locally, and transformed into (hopefully) appropriate
1276 The initial value for this toggle is
1278 in \*(Lqold line by line\*(Rq mode,
1281 in \*(Lqcharacter at a time\*(Rq mode.
1284 option is enabled, the value of
1286 is ignored, and assumed to always be
1290 has ever been enabled, then
1306 Toggles the display of all network data (in hexadecimal format).
1307 The initial value for this toggle is
1310 Toggles the display of some internal
1312 protocol processing (having to do with
1315 The initial value for this toggle is
1320 toggle is enabled, if
1322 is enabled the output from the
1324 command will be formatted in a more user readable format.
1325 Spaces are put between each character in the output, and the
1328 escape sequence is preceded by a '*' to aid in locating them.
1330 When the skiprc toggle is
1333 skips the reading of the
1335 file in the users home
1336 directory when connections are opened. The initial
1337 value for this toggle is
1340 Toggles the display of all terminal data (in hexadecimal format).
1341 The initial value for this toggle is
1343 .It Ic verbose_encrypt
1349 prints out a message each time encryption is enabled or
1350 disabled. The initial value for this toggle is
1360 This command only works when the user is using the
1362 .It Ic \&! Op Ar command
1363 Execute a single command in a subshell on the local
1366 is omitted, then an interactive
1367 subshell is invoked.
1368 .It Ic ?\& Op Ar command
1369 Get help. With no arguments,
1371 prints a help summary.
1376 will print the help information for just that command.
1381 utility uses at least the
1387 environment variables.
1388 Other environment variables may be propagated
1389 to the other side via the
1393 .Bl -tag -width ~/.telnetrc -compact
1395 user customized telnet startup values
1409 IPv6 support was added by WIDE/KAME project.
1411 On some remote systems, echo has to be turned off manually when in
1412 \*(Lqold line by line\*(Rq mode.
1414 In \*(Lqold line by line\*(Rq mode or
1418 character is only recognized (and sent to the remote system)
1419 when it is the first character on a line.