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.5 (Berkeley) 3/1/94
33 .\" $FreeBSD: src/usr.bin/telnet/telnet.1,v 1.15.2.12 2002/12/29 16:35:40 schweikh Exp $
34 .\" $DragonFly: src/usr.bin/telnet/telnet.1,v 1.4 2008/05/02 02:05:07 swildner Exp $
41 .Nd user interface to the
46 .Op Fl 468EFKLNacdfrux
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. This causes an attempt to
91 option on both input and output.
93 Stops any character from being recognized as an escape character.
95 If Kerberos V5 authentication is being used, the
97 option allows the local credentials to be forwarded
98 to the remote system, including any credentials that
99 have already been forwarded into the local environment.
101 Specifies no automatic login to the remote system.
103 Specifies an 8-bit data path on output. This causes the
105 option to be negotiated on output.
107 Prevents IP address to name lookup when destination host is given
110 Sets the IP type-of-service (TOS) option for the telnet
111 connection to the value
113 which can be a numeric TOS value
114 or, on systems that support it, a symbolic
115 TOS name found in the
121 type of authentication.
123 Attempt automatic login.
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.
214 Indicates the official name, an alias, or the Internet address
221 establishes a connection to the corresponding named socket.
223 Indicates a port number (address of an application). If a number is
224 not specified, the default
229 When in rlogin mode, a line of the form ~. disconnects from the
230 remote host; ~ is the
233 Similarly, the line ~^Z suspends the
236 The line ~^] escapes to the normal
240 Once a connection has been opened,
242 will attempt to enable the
247 will revert to one of two input modes:
248 either \*(Lqcharacter at a time\*(Rq
249 or \*(Lqold line by line\*(Rq
250 depending on what the remote system supports.
254 is enabled, character processing is done on the
255 local system, under the control of the remote system. When input
256 editing or character echoing is to be disabled, the remote system
257 will relay that information. The remote system will also relay
258 changes to any special characters that happen on the remote
259 system, so that they can take effect on the local system.
261 In \*(Lqcharacter at a time\*(Rq mode, most
262 text typed is immediately sent to the remote host for processing.
264 In \*(Lqold line by line\*(Rq mode, all text is echoed locally,
265 and (normally) only completed lines are sent to the remote host.
266 The \*(Lqlocal echo character\*(Rq (initially \*(Lq^E\*(Rq) may be used
267 to turn off and on the local echo
268 (this would mostly be used to enter passwords
269 without the password being echoed).
273 option is enabled, or if the
277 (the default for \*(Lqold line by line\*(Rq; see below),
283 characters are trapped locally, and sent as
285 protocol sequences to the remote side.
288 has ever been enabled, then the user's
301 There are options (see
308 which cause this action to flush subsequent output to the terminal
309 (until the remote host acknowledges the
311 sequence) and flush previous terminal input
317 While connected to a remote host,
319 command mode may be entered by typing the
321 \*(Lqescape character\*(Rq (initially \*(Lq^]\*(Rq).
322 When in command mode, the normal terminal editing conventions are available.
326 commands are available.
327 Only enough of each command to uniquely identify it need be typed
328 (this is also true for arguments to the
338 .Bl -tag -width "mode type"
339 .It Ic auth Ar argument ...
340 The auth command manipulates the information sent through the
341 .Dv TELNET AUTHENTICATE
342 option. Valid arguments for the
345 .Bl -tag -width "disable type"
346 .It Ic disable Ar type
347 Disables the specified type of authentication. To
348 obtain a list of available types, use the
351 .It Ic enable Ar type
352 Enables the specified type of authentication. To
353 obtain a list of available types, use the
357 Lists the current status of the various types of
363 session and return to command mode.
364 .It Ic display Ar argument ...
365 Displays all, or some, of the
370 .It Ic encrypt Ar argument ...
371 The encrypt command manipulates the information sent through the
375 Valid arguments for the
379 .It Ic disable Ar type Xo
380 .Op Cm input | output
382 Disables the specified type of encryption. If you
383 omit the input and output, both input and output
384 are disabled. To obtain a list of available
386 .Ic encrypt disable ?\&
388 .It Ic enable Ar type Xo
389 .Op Cm input | output
391 Enables the specified type of encryption. If you
392 omit input and output, both input and output are
393 enabled. To obtain a list of available types, use the
394 .Ic encrypt enable ?\&
397 This is the same as the
398 .Ic encrypt start input
401 This is the same as the
402 .Ic encrypt stop input
405 This is the same as the
406 .Ic encrypt start output
409 This is the same as the
410 .Ic encrypt stop output
412 .It Ic start Op Cm input | output
413 Attempts to start encryption. If you omit
417 both input and output are enabled. To
418 obtain a list of available types, use the
419 .Ic encrypt enable ?\&
422 Lists the current status of encryption.
423 .It Ic stop Op Cm input | output
424 Stops encryption. If you omit input and output,
425 encryption is on both input and output.
427 Sets the default type of encryption to be used
434 .It Ic environ Ar arguments ...
437 command is used to manipulate the
438 variables that may be sent through the
441 The initial set of variables is taken from the users
442 environment, with only the
446 variables being exported by default.
449 variable is also exported if the
455 Valid arguments for the
459 .It Ic define Ar variable value
464 Any variables defined by this command are automatically exported.
467 may be enclosed in single or double quotes so
468 that tabs and spaces may be included.
469 .It Ic undefine Ar variable
472 from the list of environment variables.
473 .It Ic export Ar variable
476 to be exported to the remote side.
477 .It Ic unexport Ar variable
480 to not be exported unless
481 explicitly asked for by the remote side.
483 List the current set of environment variables.
486 will be sent automatically,
487 other variables will only be sent if explicitly requested.
489 Prints out help information for the
496 option to the remote side.
497 This command is similar to a
499 command; however, if the remote side does not support the
501 option, nothing happens.
502 If, however, the remote side does support the
504 option, this command should cause the remote side to close the
507 If the remote side also supports the concept of
508 suspending a user's session for later reattachment,
509 the logout argument indicates that you
510 should terminate the session immediately.
513 is one of several options, depending on the state of the
516 The remote host is asked for permission to go into the requested mode.
517 If the remote host is capable of entering that mode, the requested
518 mode will be entered.
523 option, or, if the remote side does not understand the
525 option, then enter \*(Lqcharacter at a time\*(Rq mode.
529 option, or, if the remote side does not understand the
531 option, then attempt to enter \*(Lqold-line-by-line\*(Rq mode.
532 .It Ic isig Pq Ic \-isig
533 Attempt to enable (disable) the
538 This requires that the
541 .It Ic edit Pq Ic \-edit
542 Attempt to enable (disable) the
547 This requires that the
550 .It Ic softtabs Pq Ic \-softtabs
551 Attempt to enable (disable) the
556 This requires that the
559 .It Ic litecho Pq Ic \-litecho
560 Attempt to enable (disable) the
565 This requires that the
569 Prints out help information for the
576 .Op Oo Fl Oc Ns Ar port
578 Open a connection to the named host.
582 will attempt to contact a
584 server at the default port.
585 The host specification may be either a host name (see
587 an Internet address specified in the \*(Lqdot notation\*(Rq (see
589 or IPv6 host name or IPv6 coloned-hexadecimal address.
592 option may be used to specify the user name
593 to be passed to the remote system via the
596 When connecting to a non-standard port,
598 omits any automatic initiation of
600 options. When the port number is preceded by a minus sign,
601 the initial option negotiation is done.
602 After establishing a connection, the file
605 users home directory is opened. Lines beginning with a # are
606 comment lines. Blank lines are ignored. Lines that begin
607 without white space are the start of a machine entry. The
608 first thing on the line is the name of the machine that is
609 being connected to. The rest of the line, and successive
610 lines that begin with white space are assumed to be
612 commands and are processed as if they had been typed
621 An end of file (in command mode) will also close a session and exit.
622 .It Ic send Ar arguments
623 Sends one or more special character sequences to the remote host.
624 The following are the arguments which may be specified
625 (more than one argument may be specified at a time):
626 .Bl -tag -width escape
636 (Abort Output) sequence, which should cause the remote system to flush
646 sequence, to which the remote system may or may not choose to respond.
650 (Break) sequence, which may have significance to the remote
656 sequence, which should cause the remote system to erase the last character
662 sequence, which should cause the remote system to erase the line currently
677 escape character (initially \*(Lq^\*(Rq).
682 sequence, which likely has no significance to the remote system.
684 If the remote side supports the
688 will send the subnegotiation to request that the server send
689 its current option status.
693 (Interrupt Process) sequence, which should cause the remote
694 system to abort the currently running process.
709 This sequence causes the remote system to discard all previously typed
710 (but not yet read) input.
711 This sequence is sent as
714 data (and may not work if the remote system is a
717 it doesn't work, a lower case \*(Lqr\*(Rq may be echoed on the terminal).
727 can be either a decimal number between 0 and 255,
728 or a symbolic name for a specific
736 to print out help information, including
737 a list of known symbolic names.
739 Prints out help information for the
743 .It Ic set Ar argument value
744 .It Ic unset Ar argument value
747 command will set any one of a number of
749 variables to a specific value or to
753 turns off the function associated with
754 the variable, this is equivalent to using the
759 command will disable or set to
761 any of the specified functions.
762 The values of variables may be interrogated with the
765 The variables which may be set or unset, but not toggled, are
766 listed here. In addition, any of the variables for the
768 command may be explicitly set or unset using
774 .Bl -tag -width escape
778 is in localchars mode, or
780 is enabled, and the status character is typed, a
784 preceding) is sent to the
785 remote host. The initial value for the \*(LqAre You There\*(Rq
786 character is the terminal's status character.
788 This is the value (initially \*(Lq^E\*(Rq) which, when in
789 \*(Lqline by line\*(Rq mode, toggles between doing local echoing
790 of entered characters (for normal processing), and suppressing
791 echoing of entered characters (for entering, say, a password).
797 or \*(Lqold line by line\*(Rq mode, entering this character
798 as the first character on a line will cause this character to be
799 sent to the remote system.
800 The initial value of the eof character is taken to be the terminal's
815 is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
816 character is typed, a
822 is sent to the remote system.
823 The initial value for the erase character is taken to be
830 escape character (initially \*(Lq^[\*(Rq) which causes entry
833 command mode (when connected to a remote system).
845 character is typed, a
851 is sent to the remote host.
852 The initial value for the flush character is taken to be
863 characters that, when typed, cause partial lines to be
864 forwarded to the remote system. The initial value for
865 the forwarding characters are taken from the terminal's
866 eol and eol2 characters.
878 character is typed, a
884 is sent to the remote host.
885 The initial value for the interrupt character is taken to be
901 is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
902 character is typed, a
908 is sent to the remote system.
909 The initial value for the kill character is taken to be
918 or \*(Lqold line by line\*(Rq mode, then this character is taken to
922 The initial value for the lnext character is taken to be
937 character is typed, a
943 is sent to the remote host.
944 The initial value for the quit character is taken to be
953 or \*(Lqold line by line\*(Rq mode, then this character is taken to
957 The initial value for the reprint character is taken to be
962 This is the rlogin escape character.
965 escape character is ignored unless it is
966 preceded by this character at the beginning of a line.
967 This character, at the beginning of a line followed by
968 a "." closes the connection; when followed by a ^Z it
971 command. The initial state is to
977 .Dv TELNET TOGGLE-FLOW-CONTROL
978 option has been enabled,
979 then this character is taken to
983 The initial value for the start character is taken to be
989 .Dv TELNET TOGGLE-FLOW-CONTROL
990 option has been enabled,
991 then this character is taken to
995 The initial value for the stop character is taken to be
1008 character is typed, a
1014 is sent to the remote host.
1015 The initial value for the suspend character is taken to be
1020 This is the file to which the output, caused by
1026 will be written. If it is set to
1028 then tracing information will be written to standard output (the default).
1034 or \*(Lqold line by line\*(Rq mode, then this character is taken to
1038 The initial value for the worderase character is taken to be
1048 .It Ic skey Ar sequence challenge
1051 command computes a response to the S/Key challenge.
1055 command (Set Local Characters) is used to set
1056 or change the state of the special
1060 been enabled. Special characters are characters that get
1063 commands sequences (like
1067 or line editing characters (like
1071 By default, the local special characters are exported.
1074 Verify the current settings for the current special characters.
1075 The remote side is requested to send all the current special
1076 character settings, and if there are any discrepancies with
1077 the local side, the local side will switch to the remote value.
1079 Switch to the local defaults for the special characters. The
1080 local default characters are those of the local terminal at
1085 Switch to the remote defaults for the special characters.
1086 The remote default characters are those of the remote system
1087 at the time when the
1089 connection was established.
1091 Prints out help information for the
1096 Show the current status of
1098 This includes the peer one is connected to, as well
1099 as the current mode.
1100 .It Ic toggle Ar arguments ...
1105 various flags that control how
1108 These flags may be set explicitly to
1116 commands listed above.
1117 More than one argument may be specified.
1118 The state of these flags may be interrogated with the
1121 Valid arguments are:
1124 Turns on debugging information for the authentication code.
1136 characters are recognized (and transformed into
1142 refuses to display any data on the user's terminal
1143 until the remote system acknowledges (via a
1144 .Dv TELNET TIMING MARK
1146 that it has processed those
1149 The initial value for this toggle is
1151 if the terminal user had not
1152 done an "stty noflsh", otherwise
1159 option is negotiated, by
1160 default the actual encryption (decryption) of the data
1161 stream does not start automatically. The autoencrypt
1162 (autodecrypt) command states that encryption of the
1163 output (input) stream should be enabled as soon as
1166 If the remote side supports the
1167 .Dv TELNET AUTHENTICATION
1170 attempts to use it to perform automatic authentication. If the
1172 option is not supported, the user's login
1173 name are propagated through the
1176 This command is the same as specifying
1188 then when either the
1192 characters is typed (see
1194 above for descriptions of the
1198 characters), the resulting
1200 sequence sent is followed by the
1205 cause the remote system to begin throwing away all previously
1206 typed input until both of the
1208 sequences have been read and acted upon.
1209 The initial value of this toggle is
1212 Enable or disable the
1214 option on both input and output.
1216 Enable or disable the
1220 Enable or disable the
1226 then carriage returns will be sent as
1230 then carriage returns will be send as
1232 The initial value for this toggle is
1235 Toggle carriage return mode.
1236 When this mode is enabled, most carriage return characters received from
1237 the remote host will be mapped into a carriage return followed by
1239 This mode does not affect those characters typed by the user, only
1240 those received from the remote host.
1241 This mode is not very useful unless the remote host
1242 only sends carriage return, but never line feed.
1243 The initial value for this toggle is
1246 Toggles socket level debugging (useful only to the
1248 The initial value for this toggle is
1251 Turns on debugging information for the encryption code.
1264 above) are recognized locally, and transformed into (hopefully) appropriate
1277 The initial value for this toggle is
1279 in \*(Lqold line by line\*(Rq mode,
1282 in \*(Lqcharacter at a time\*(Rq mode.
1285 option is enabled, the value of
1287 is ignored, and assumed to always be
1291 has ever been enabled, then
1307 Toggles the display of all network data (in hexadecimal format).
1308 The initial value for this toggle is
1311 Toggles the display of some internal
1313 protocol processing (having to do with
1316 The initial value for this toggle is
1321 toggle is enabled, if
1323 is enabled the output from the
1325 command will be formatted in a more user readable format.
1326 Spaces are put between each character in the output, and the
1329 escape sequence is preceded by a '*' to aid in locating them.
1331 When the skiprc toggle is
1334 skips the reading of the
1336 file in the users home
1337 directory when connections are opened. The initial
1338 value for this toggle is
1341 Toggles the display of all terminal data (in hexadecimal format).
1342 The initial value for this toggle is
1344 .It Ic verbose_encrypt
1350 prints out a message each time encryption is enabled or
1351 disabled. The initial value for this toggle is
1361 This command only works when the user is using the
1363 .It Ic \&! Op Ar command
1364 Execute a single command in a subshell on the local
1367 is omitted, then an interactive
1368 subshell is invoked.
1369 .It Ic ?\& Op Ar command
1370 Get help. With no arguments,
1372 prints a help summary.
1377 will print the help information for just that command.
1382 utility uses at least the
1388 environment variables.
1389 Other environment variables may be propagated
1390 to the other side via the
1394 .Bl -tag -width ~/.telnetrc -compact
1396 user customized telnet startup values
1410 IPv6 support was added by WIDE/KAME project.
1412 On some remote systems, echo has to be turned off manually when in
1413 \*(Lqold line by line\*(Rq mode.
1415 In \*(Lqold line by line\*(Rq mode or
1419 character is only recognized (and sent to the remote system)
1420 when it is the first character on a line.