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.
84 This causes an attempt to negotiate the
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.
102 option to be negotiated on output.
104 Prevents IP address to name lookup when destination host is given
107 Sets the IP type-of-service (TOS) option for the telnet
108 connection to the value
110 which can be a numeric TOS value
111 or, on systems that support it, a symbolic
112 TOS name found in the
118 type of authentication.
120 Attempt automatic login.
121 Currently, this sends the user name via the
126 option if supported by the remote system.
127 The name used is that of the current user as returned by
129 if it agrees with the current user ID,
130 otherwise it is the name associated with the user ID.
132 Disables the reading of the user's
137 command on this man page.)
139 Sets the initial value of the
143 .It Fl e Ar escapechar
151 there will be no escape character.
153 If Kerberos V5 authentication is being used, the
155 option allows the local credentials to be forwarded to the remote system.
157 If Kerberos authentication is being used, the
161 obtain tickets for the remote host in
164 instead of the remote host's realm, as determined by
165 .Xr krb_realmofhost 3 .
167 When connecting to the remote system, if the remote system
172 will be sent to the remote system as the value for the variable
174 This option implies the
177 This option may also be used with the
180 .It Fl n Ar tracefile
183 for recording trace information.
188 Specifies a user interface similar to
189 .Xr rlogin 1 Pq Pa net/bsdrcmds .
191 mode, the escape character is set to the tilde (~) character,
192 unless modified by the
196 Set the source IP address for the
200 which can be an IP address or a host name.
206 addresses only (e.g.,
208 domain sockets, accessed with a file path).
210 Turns on encryption of the data stream if possible.
211 This is now the default, so this option is ignored.
213 Suppresses encryption of the data stream.
215 Indicates the official name, an alias, or the Internet address
222 establishes a connection to the corresponding named socket.
224 Indicates a port number (address of an application).
226 not specified, the default
231 When in rlogin mode, a line of the form ~.\& disconnects from the
232 remote host; ~ is the
235 Similarly, the line ~^Z suspends the
238 The line ~^] escapes to the normal
242 Once a connection has been opened,
244 will attempt to enable the
249 will revert to one of two input modes:
250 either \*(Lqcharacter at a time\*(Rq
251 or \*(Lqold line by line\*(Rq
252 depending on what the remote system supports.
256 is enabled, character processing is done on the
257 local system, under the control of the remote system.
259 editing or character echoing is to be disabled, the remote system
260 will relay that information.
261 The remote system will also relay
262 changes to any special characters that happen on the remote
263 system, so that they can take effect on the local system.
265 In \*(Lqcharacter at a time\*(Rq mode, most
266 text typed is immediately sent to the remote host for processing.
268 In \*(Lqold line by line\*(Rq mode, all text is echoed locally,
269 and (normally) only completed lines are sent to the remote host.
270 The \*(Lqlocal echo character\*(Rq (initially \*(Lq^E\*(Rq) may be used
271 to turn off and on the local echo
272 (this would mostly be used to enter passwords
273 without the password being echoed).
277 option is enabled, or if the
281 (the default for \*(Lqold line by line\*(Rq; see below),
287 characters are trapped locally, and sent as
289 protocol sequences to the remote side.
292 has ever been enabled, then the user's
305 There are options (see
312 which cause this action to flush subsequent output to the terminal
313 (until the remote host acknowledges the
315 sequence) and flush previous terminal input
321 While connected to a remote host,
323 command mode may be entered by typing the
325 \*(Lqescape character\*(Rq (initially \*(Lq^]\*(Rq).
326 When in command mode, the normal terminal editing conventions are available.
330 commands are available.
331 Only enough of each command to uniquely identify it need be typed
332 (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
347 Valid arguments for the
350 .Bl -tag -width "disable type"
351 .It Ic disable Ar type
352 Disables the specified type of authentication.
353 To obtain a list of available types, use the
356 .It Ic enable Ar type
357 Enables the specified type of authentication.
358 To obtain a list of available types, use the
362 Lists the current status of the various types of
368 session and return to command mode.
369 .It Ic display Ar argument ...
370 Displays all, or some, of the
375 .It Ic encrypt Ar argument ...
376 The encrypt command manipulates the information sent through the
380 Valid arguments for the
384 .It Ic disable Ar type Xo
385 .Op Cm input | output
387 Disables the specified type of encryption.
388 If you omit the input and output, both input and output are disabled.
389 To obtain a list of available types, use the
390 .Ic encrypt disable ?\&
392 .It Ic enable Ar type Xo
393 .Op Cm input | output
395 Enables the specified type of encryption.
396 If you omit input and output, both input and output are enabled.
397 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.
422 both input and output are enabled.
423 To obtain a list of available types, use the
424 .Ic encrypt enable ?\&
427 Lists the current status of encryption.
428 .It Ic stop Op Cm input | output
430 If you omit input and output,
431 encryption is on both input and output.
433 Sets the default type of encryption to be used
440 .It Ic environ Ar arguments ...
443 command is used to manipulate the
444 variables that may be sent through the
447 The initial set of variables is taken from the users
448 environment, with only the
452 variables being exported by default.
455 variable is also exported if the
461 Valid arguments for the
465 .It Ic define Ar variable value
470 Any variables defined by this command are automatically exported.
473 may be enclosed in single or double quotes so
474 that tabs and spaces may be included.
475 .It Ic undefine Ar variable
478 from the list of environment variables.
479 .It Ic export Ar variable
482 to be exported to the remote side.
483 .It Ic unexport Ar variable
486 to not be exported unless
487 explicitly asked for by the remote side.
489 List the current set of environment variables.
492 will be sent automatically,
493 other variables will only be sent if explicitly requested.
495 Prints out help information for the
502 option to the remote side.
503 This command is similar to a
505 command; however, if the remote side does not support the
507 option, nothing happens.
508 If, however, the remote side does support the
510 option, this command should cause the remote side to close the
513 If the remote side also supports the concept of
514 suspending a user's session for later reattachment,
515 the logout argument indicates that you
516 should terminate the session immediately.
519 is one of several options, depending on the state of the
522 The remote host is asked for permission to go into the requested mode.
523 If the remote host is capable of entering that mode, the requested
524 mode will be entered.
529 option, or, if the remote side does not understand the
531 option, then enter \*(Lqcharacter at a time\*(Rq mode.
535 option, or, if the remote side does not understand the
537 option, then attempt to enter \*(Lqold-line-by-line\*(Rq mode.
538 .It Ic isig Pq Ic \-isig
539 Attempt to enable (disable) the
544 This requires that the
547 .It Ic edit Pq Ic \-edit
548 Attempt to enable (disable) the
553 This requires that the
556 .It Ic softtabs Pq Ic \-softtabs
557 Attempt to enable (disable) the
562 This requires that the
565 .It Ic litecho Pq Ic \-litecho
566 Attempt to enable (disable) the
571 This requires that the
575 Prints out help information for the
582 .Op Oo Fl Oc Ns Ar port
584 Open a connection to the named host.
588 will attempt to contact a
590 server at the default port.
591 The host specification may be either a host name (see
593 an Internet address specified in the \*(Lqdot notation\*(Rq (see
595 or IPv6 host name or IPv6 coloned-hexadecimal address.
598 option may be used to specify the user name
599 to be passed to the remote system via the
602 When connecting to a non-standard port,
604 omits any automatic initiation of
607 When the port number is preceded by a minus sign,
608 the initial option negotiation is done.
609 After establishing a connection, the file
612 users home directory is opened.
613 Lines beginning with a # are comment lines.
614 Blank lines are ignored.
615 Lines that begin without white space are the start of a machine entry.
616 The first thing on the line is the name of the machine that is
618 The rest of the line, and successive
619 lines that begin with white space are assumed to be
621 commands and are processed as if they had been typed
630 An end of file (in command mode) will also close a session and exit.
631 .It Ic send Ar arguments
632 Sends one or more special character sequences to the remote host.
633 The following are the arguments which may be specified
634 (more than one argument may be specified at a time):
635 .Bl -tag -width escape
645 (Abort Output) sequence, which should cause the remote system to flush
655 sequence, to which the remote system may or may not choose to respond.
659 (Break) sequence, which may have significance to the remote
665 sequence, which should cause the remote system to erase the last character
671 sequence, which should cause the remote system to erase the line currently
686 escape character (initially \*(Lq^\*(Rq).
691 sequence, which likely has no significance to the remote system.
693 If the remote side supports the
697 will send the subnegotiation to request that the server send
698 its current option status.
702 (Interrupt Process) sequence, which should cause the remote
703 system to abort the currently running process.
718 This sequence causes the remote system to discard all previously typed
719 (but not yet read) input.
720 This sequence is sent as
723 data (and may not work if the remote system is a
726 it doesn't work, a lower case \*(Lqr\*(Rq may be echoed on the terminal).
736 can be either a decimal number between 0 and 255,
737 or a symbolic name for a specific
745 to print out help information, including
746 a list of known symbolic names.
748 Prints out help information for the
752 .It Ic set Ar argument value
753 .It Ic unset Ar argument value
756 command will set any one of a number of
758 variables to a specific value or to
762 turns off the function associated with
763 the variable, this is equivalent to using the
768 command will disable or set to
770 any of the specified functions.
771 The values of variables may be interrogated with the
774 The variables which may be set or unset, but not toggled, are listed here.
775 In addition, any of the variables for the
777 command may be explicitly set or unset using
783 .Bl -tag -width escape
787 is in localchars mode, or
789 is enabled, and the status character is typed, a
793 preceding) is sent to the remote host.
794 The initial value for the \*(LqAre You There\*(Rq
795 character is the terminal's status character.
797 This is the value (initially \*(Lq^E\*(Rq) which, when in
798 \*(Lqline by line\*(Rq mode, toggles between doing local echoing
799 of entered characters (for normal processing), and suppressing
800 echoing of entered characters (for entering, say, a password).
806 or \*(Lqold line by line\*(Rq mode, entering this character
807 as the first character on a line will cause this character to be
808 sent to the remote system.
809 The initial value of the eof character is taken to be the terminal's
824 is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
825 character is typed, a
831 is sent to the remote system.
832 The initial value for the erase character is taken to be
839 escape character (initially \*(Lq^[\*(Rq) which causes entry
842 command mode (when connected to a remote system).
854 character is typed, a
860 is sent to the remote host.
861 The initial value for the flush character is taken to be
872 characters that, when typed, cause partial lines to be
873 forwarded to the remote system.
874 The initial value for
875 the forwarding characters are taken from the terminal's
876 eol and eol2 characters.
888 character is typed, a
894 is sent to the remote host.
895 The initial value for the interrupt character is taken to be
911 is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
912 character is typed, a
918 is sent to the remote system.
919 The initial value for the kill character is taken to be
928 or \*(Lqold line by line\*(Rq mode, then this character is taken to
932 The initial value for the lnext character is taken to be
947 character is typed, a
953 is sent to the remote host.
954 The initial value for the quit character is taken to be
963 or \*(Lqold line by line\*(Rq mode, then this character is taken to
967 The initial value for the reprint character is taken to be
972 This is the rlogin escape character.
975 escape character is ignored unless it is
976 preceded by this character at the beginning of a line.
977 This character, at the beginning of a line followed by
978 a "." closes the connection; when followed by a ^Z it
982 The initial state is to disable the
987 .Dv TELNET TOGGLE-FLOW-CONTROL
988 option has been enabled,
989 then this character is taken to
993 The initial value for the start character is taken to be
999 .Dv TELNET TOGGLE-FLOW-CONTROL
1000 option has been enabled,
1001 then this character is taken to
1005 The initial value for the stop character is taken to be
1018 character is typed, a
1024 is sent to the remote host.
1025 The initial value for the suspend character is taken to be
1030 This is the file to which the output, caused by
1039 then tracing information will be written to standard output (the default).
1045 or \*(Lqold line by line\*(Rq mode, then this character is taken to
1049 The initial value for the worderase character is taken to be
1059 .It Ic opie Ar sequence challenge
1062 command computes a response to the OPIE challenge.
1066 command (Set Local Characters) is used to set
1067 or change the state of the special
1070 option has been enabled.
1071 Special characters are characters that get mapped to
1073 commands sequences (like
1077 or line editing characters (like
1081 By default, the local special characters are exported.
1084 Verify the current settings for the current special characters.
1085 The remote side is requested to send all the current special
1086 character settings, and if there are any discrepancies with
1087 the local side, the local side will switch to the remote value.
1089 Switch to the local defaults for the special characters.
1090 The local default characters are those of the local terminal at the time when
1094 Switch to the remote defaults for the special characters.
1095 The remote default characters are those of the remote system
1096 at the time when the
1098 connection was established.
1100 Prints out help information for the
1105 Show the current status of
1107 This includes the peer one is connected to, as well
1108 as the current mode.
1109 .It Ic toggle Ar arguments ...
1114 various flags that control how
1117 These flags may be set explicitly to
1125 commands listed above.
1126 More than one argument may be specified.
1127 The state of these flags may be interrogated with the
1130 Valid arguments are:
1133 Turns on debugging information for the authentication code.
1145 characters are recognized (and transformed into
1151 refuses to display any data on the user's terminal
1152 until the remote system acknowledges (via a
1153 .Dv TELNET TIMING MARK
1155 that it has processed those
1158 The initial value for this toggle is
1160 if the terminal user had not
1161 done an "stty noflsh", otherwise
1168 option is negotiated, by
1169 default the actual encryption (decryption) of the data
1170 stream does not start automatically.
1171 The autoencrypt (autodecrypt) command states that encryption of the
1172 output (input) stream should be enabled as soon as possible.
1174 If the remote side supports the
1175 .Dv TELNET AUTHENTICATION
1178 attempts to use it to perform automatic authentication.
1181 option is not supported, the user's login
1182 name are propagated through the
1185 This command is the same as specifying
1197 then when either the
1201 characters is typed (see
1203 above for descriptions of the
1207 characters), the resulting
1209 sequence sent is followed by the
1214 cause the remote system to begin throwing away all previously
1215 typed input until both of the
1217 sequences have been read and acted upon.
1218 The initial value of this toggle is
1221 Enable or disable the
1223 option on both input and output.
1225 Enable or disable the
1229 Enable or disable the
1235 then carriage returns will be sent as
1239 then carriage returns will be send as
1241 The initial value for this toggle is
1244 Toggle carriage return mode.
1245 When this mode is enabled, most carriage return characters received from
1246 the remote host will be mapped into a carriage return followed by
1248 This mode does not affect those characters typed by the user, only
1249 those received from the remote host.
1250 This mode is not very useful unless the remote host
1251 only sends carriage return, but never line feed.
1252 The initial value for this toggle is
1255 Toggles socket level debugging (useful only to the
1257 The initial value for this toggle is
1260 Turns on debugging information for the encryption code.
1273 above) are recognized locally, and transformed into (hopefully) appropriate
1286 The initial value for this toggle is
1288 in \*(Lqold line by line\*(Rq mode,
1291 in \*(Lqcharacter at a time\*(Rq mode.
1294 option is enabled, the value of
1296 is ignored, and assumed to always be
1300 has ever been enabled, then
1316 Toggles the display of all network data (in hexadecimal format).
1317 The initial value for this toggle is
1320 Toggles the display of some internal
1322 protocol processing (having to do with
1325 The initial value for this toggle is
1330 toggle is enabled, if
1332 is enabled the output from the
1334 command will be formatted in a more user readable format.
1335 Spaces are put between each character in the output, and the
1338 escape sequence is preceded by a '*' to aid in locating them.
1340 When the skiprc toggle is
1343 skips the reading of the
1345 file in the users home
1346 directory when connections are opened.
1347 The initial value for this toggle is
1350 Toggles the display of all terminal data (in hexadecimal format).
1351 The initial value for this toggle is
1353 .It Ic verbose_encrypt
1359 prints out a message each time encryption is enabled or disabled.
1360 The initial value for this toggle is
1370 This command only works when the user is using the
1372 .It Ic \&! Op Ar command
1373 Execute a single command in a subshell on the local system.
1376 is omitted, then an interactive
1377 subshell is invoked.
1378 .It Ic ?\& Op Ar command
1382 prints a help summary.
1387 will print the help information for just that command.
1392 utility uses at least the
1398 environment variables.
1399 Other environment variables may be propagated
1400 to the other side via the
1404 .Bl -tag -width ~/.telnetrc -compact
1406 user customized telnet startup values
1409 .Xr rlogin 1 Pq Pa net/bsdrcmds ,
1410 .Xr rsh 1 Pq Pa net/bsdrcmds ,
1420 IPv6 support was added by WIDE/KAME project.
1422 On some remote systems, echo has to be turned off manually when in
1423 \*(Lqold line by line\*(Rq mode.
1425 In \*(Lqold line by line\*(Rq mode or
1429 character is only recognized (and sent to the remote system)
1430 when it is the first character on a line.