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.3 2006/02/17 19:39:11 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
339 .Bl -tag -width "mode type"
340 .It Ic auth Ar argument ...
341 The auth command manipulates the information sent through the
342 .Dv TELNET AUTHENTICATE
343 option. Valid arguments for the
346 .Bl -tag -width "disable type"
347 .It Ic disable Ar type
348 Disables the specified type of authentication. To
349 obtain a list of available types, use the
352 .It Ic enable Ar type
353 Enables the specified type of authentication. To
354 obtain a list of available types, use the
358 Lists the current status of the various types of
364 session and return to command mode.
365 .It Ic display Ar argument ...
366 Displays all, or some, of the
371 .It Ic encrypt Ar argument ...
372 The encrypt command manipulates the information sent through the
376 Valid arguments for the
380 .It Ic disable Ar type Xo
381 .Op Cm input | output
383 Disables the specified type of encryption. If you
384 omit the input and output, both input and output
385 are disabled. To obtain a list of available
387 .Ic encrypt disable ?\&
389 .It Ic enable Ar type Xo
390 .Op Cm input | output
392 Enables the specified type of encryption. If you
393 omit input and output, both input and output are
394 enabled. To obtain a list of available types, use the
395 .Ic encrypt enable ?\&
398 This is the same as the
399 .Ic encrypt start input
402 This is the same as the
403 .Ic encrypt stop input
406 This is the same as the
407 .Ic encrypt start output
410 This is the same as the
411 .Ic encrypt stop output
413 .It Ic start Op Cm input | output
414 Attempts to start encryption. If you omit
418 both input and output are enabled. To
419 obtain a list of available types, use the
420 .Ic encrypt enable ?\&
423 Lists the current status of encryption.
424 .It Ic stop Op Cm input | output
425 Stops encryption. If you omit input and output,
426 encryption is on both input and output.
428 Sets the default type of encryption to be used
435 .It Ic environ Ar arguments ...
438 command is used to manipulate the
439 variables that may be sent through the
442 The initial set of variables is taken from the users
443 environment, with only the
447 variables being exported by default.
450 variable is also exported if the
456 Valid arguments for the
460 .It Ic define Ar variable value
465 Any variables defined by this command are automatically exported.
468 may be enclosed in single or double quotes so
469 that tabs and spaces may be included.
470 .It Ic undefine Ar variable
473 from the list of environment variables.
474 .It Ic export Ar variable
477 to be exported to the remote side.
478 .It Ic unexport Ar variable
481 to not be exported unless
482 explicitly asked for by the remote side.
484 List the current set of environment variables.
487 will be sent automatically,
488 other variables will only be sent if explicitly requested.
490 Prints out help information for the
497 option to the remote side.
498 This command is similar to a
500 command; however, if the remote side does not support the
502 option, nothing happens.
503 If, however, the remote side does support the
505 option, this command should cause the remote side to close the
508 If the remote side also supports the concept of
509 suspending a user's session for later reattachment,
510 the logout argument indicates that you
511 should terminate the session immediately.
514 is one of several options, depending on the state of the
517 The remote host is asked for permission to go into the requested mode.
518 If the remote host is capable of entering that mode, the requested
519 mode will be entered.
524 option, or, if the remote side does not understand the
526 option, then enter \*(Lqcharacter at a time\*(Rq mode.
530 option, or, if the remote side does not understand the
532 option, then attempt to enter \*(Lqold-line-by-line\*(Rq mode.
533 .It Ic isig Pq Ic \-isig
534 Attempt to enable (disable) the
539 This requires that the
542 .It Ic edit Pq Ic \-edit
543 Attempt to enable (disable) the
548 This requires that the
551 .It Ic softtabs Pq Ic \-softtabs
552 Attempt to enable (disable) the
557 This requires that the
560 .It Ic litecho Pq Ic \-litecho
561 Attempt to enable (disable) the
566 This requires that the
570 Prints out help information for the
577 .Op Oo Fl Oc Ns Ar port
579 Open a connection to the named host.
583 will attempt to contact a
585 server at the default port.
586 The host specification may be either a host name (see
588 an Internet address specified in the \*(Lqdot notation\*(Rq (see
590 or IPv6 host name or IPv6 coloned-hexadecimal address.
593 option may be used to specify the user name
594 to be passed to the remote system via the
597 When connecting to a non-standard port,
599 omits any automatic initiation of
601 options. When the port number is preceded by a minus sign,
602 the initial option negotiation is done.
603 After establishing a connection, the file
606 users home directory is opened. Lines beginning with a # are
607 comment lines. Blank lines are ignored. Lines that begin
608 without white space are the start of a machine entry. The
609 first thing on the line is the name of the machine that is
610 being connected to. The rest of the line, and successive
611 lines that begin with white space are assumed to be
613 commands and are processed as if they had been typed
622 An end of file (in command mode) will also close a session and exit.
623 .It Ic send Ar arguments
624 Sends one or more special character sequences to the remote host.
625 The following are the arguments which may be specified
626 (more than one argument may be specified at a time):
628 .Bl -tag -width escape
638 (Abort Output) sequence, which should cause the remote system to flush
648 sequence, to which the remote system may or may not choose to respond.
652 (Break) sequence, which may have significance to the remote
658 sequence, which should cause the remote system to erase the last character
664 sequence, which should cause the remote system to erase the line currently
679 escape character (initially \*(Lq^\*(Rq).
684 sequence, which likely has no significance to the remote system.
686 If the remote side supports the
690 will send the subnegotiation to request that the server send
691 its current option status.
695 (Interrupt Process) sequence, which should cause the remote
696 system to abort the currently running process.
711 This sequence causes the remote system to discard all previously typed
712 (but not yet read) input.
713 This sequence is sent as
716 data (and may not work if the remote system is a
719 it doesn't work, a lower case \*(Lqr\*(Rq may be echoed on the terminal).
729 can be either a decimal number between 0 and 255,
730 or a symbolic name for a specific
738 to print out help information, including
739 a list of known symbolic names.
741 Prints out help information for the
745 .It Ic set Ar argument value
746 .It Ic unset Ar argument value
749 command will set any one of a number of
751 variables to a specific value or to
755 turns off the function associated with
756 the variable, this is equivalent to using the
761 command will disable or set to
763 any of the specified functions.
764 The values of variables may be interrogated with the
767 The variables which may be set or unset, but not toggled, are
768 listed here. In addition, any of the variables for the
770 command may be explicitly set or unset using
776 .Bl -tag -width escape
780 is in localchars mode, or
782 is enabled, and the status character is typed, a
786 preceding) is sent to the
787 remote host. The initial value for the \*(LqAre You There\*(Rq
788 character is the terminal's status character.
790 This is the value (initially \*(Lq^E\*(Rq) which, when in
791 \*(Lqline by line\*(Rq mode, toggles between doing local echoing
792 of entered characters (for normal processing), and suppressing
793 echoing of entered characters (for entering, say, a password).
799 or \*(Lqold line by line\*(Rq mode, entering this character
800 as the first character on a line will cause this character to be
801 sent to the remote system.
802 The initial value of the eof character is taken to be the terminal's
817 is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
818 character is typed, a
824 is sent to the remote system.
825 The initial value for the erase character is taken to be
832 escape character (initially \*(Lq^[\*(Rq) which causes entry
835 command mode (when connected to a remote system).
847 character is typed, a
853 is sent to the remote host.
854 The initial value for the flush character is taken to be
865 characters that, when typed, cause partial lines to be
866 forwarded to the remote system. The initial value for
867 the forwarding characters are taken from the terminal's
868 eol and eol2 characters.
880 character is typed, a
886 is sent to the remote host.
887 The initial value for the interrupt character is taken to be
903 is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
904 character is typed, a
910 is sent to the remote system.
911 The initial value for the kill character is taken to be
920 or \*(Lqold line by line\*(Rq mode, then this character is taken to
924 The initial value for the lnext character is taken to be
939 character is typed, a
945 is sent to the remote host.
946 The initial value for the quit character is taken to be
955 or \*(Lqold line by line\*(Rq mode, then this character is taken to
959 The initial value for the reprint character is taken to be
964 This is the rlogin escape character.
967 escape character is ignored unless it is
968 preceded by this character at the beginning of a line.
969 This character, at the beginning of a line followed by
970 a "." closes the connection; when followed by a ^Z it
973 command. The initial state is to
979 .Dv TELNET TOGGLE-FLOW-CONTROL
980 option has been enabled,
981 then this character is taken to
985 The initial value for the start character is taken to be
991 .Dv TELNET TOGGLE-FLOW-CONTROL
992 option has been enabled,
993 then this character is taken to
997 The initial value for the stop character is taken to be
1010 character is typed, a
1016 is sent to the remote host.
1017 The initial value for the suspend character is taken to be
1022 This is the file to which the output, caused by
1028 will be written. If it is set to
1030 then tracing information will be written to standard output (the default).
1036 or \*(Lqold line by line\*(Rq mode, then this character is taken to
1040 The initial value for the worderase character is taken to be
1050 .It Ic skey Ar sequence challenge
1053 command computes a response to the S/Key challenge.
1057 command (Set Local Characters) is used to set
1058 or change the state of the special
1062 been enabled. Special characters are characters that get
1065 commands sequences (like
1069 or line editing characters (like
1073 By default, the local special characters are exported.
1076 Verify the current settings for the current special characters.
1077 The remote side is requested to send all the current special
1078 character settings, and if there are any discrepancies with
1079 the local side, the local side will switch to the remote value.
1081 Switch to the local defaults for the special characters. The
1082 local default characters are those of the local terminal at
1087 Switch to the remote defaults for the special characters.
1088 The remote default characters are those of the remote system
1089 at the time when the
1091 connection was established.
1093 Prints out help information for the
1098 Show the current status of
1100 This includes the peer one is connected to, as well
1101 as the current mode.
1102 .It Ic toggle Ar arguments ...
1107 various flags that control how
1110 These flags may be set explicitly to
1118 commands listed above.
1119 More than one argument may be specified.
1120 The state of these flags may be interrogated with the
1123 Valid arguments are:
1126 Turns on debugging information for the authentication code.
1138 characters are recognized (and transformed into
1144 refuses to display any data on the user's terminal
1145 until the remote system acknowledges (via a
1146 .Dv TELNET TIMING MARK
1148 that it has processed those
1151 The initial value for this toggle is
1153 if the terminal user had not
1154 done an "stty noflsh", otherwise
1161 option is negotiated, by
1162 default the actual encryption (decryption) of the data
1163 stream does not start automatically. The autoencrypt
1164 (autodecrypt) command states that encryption of the
1165 output (input) stream should be enabled as soon as
1168 If the remote side supports the
1169 .Dv TELNET AUTHENTICATION
1172 attempts to use it to perform automatic authentication. If the
1174 option is not supported, the user's login
1175 name are propagated through the
1178 This command is the same as specifying
1190 then when either the
1194 characters is typed (see
1196 above for descriptions of the
1200 characters), the resulting
1202 sequence sent is followed by the
1207 cause the remote system to begin throwing away all previously
1208 typed input until both of the
1210 sequences have been read and acted upon.
1211 The initial value of this toggle is
1214 Enable or disable the
1216 option on both input and output.
1218 Enable or disable the
1222 Enable or disable the
1228 then carriage returns will be sent as
1232 then carriage returns will be send as
1234 The initial value for this toggle is
1237 Toggle carriage return mode.
1238 When this mode is enabled, most carriage return characters received from
1239 the remote host will be mapped into a carriage return followed by
1241 This mode does not affect those characters typed by the user, only
1242 those received from the remote host.
1243 This mode is not very useful unless the remote host
1244 only sends carriage return, but never line feed.
1245 The initial value for this toggle is
1248 Toggles socket level debugging (useful only to the
1250 The initial value for this toggle is
1253 Turns on debugging information for the encryption code.
1266 above) are recognized locally, and transformed into (hopefully) appropriate
1279 The initial value for this toggle is
1281 in \*(Lqold line by line\*(Rq mode,
1284 in \*(Lqcharacter at a time\*(Rq mode.
1287 option is enabled, the value of
1289 is ignored, and assumed to always be
1293 has ever been enabled, then
1309 Toggles the display of all network data (in hexadecimal format).
1310 The initial value for this toggle is
1313 Toggles the display of some internal
1315 protocol processing (having to do with
1318 The initial value for this toggle is
1323 toggle is enabled, if
1325 is enabled the output from the
1327 command will be formatted in a more user readable format.
1328 Spaces are put between each character in the output, and the
1331 escape sequence is preceded by a '*' to aid in locating them.
1333 When the skiprc toggle is
1336 skips the reading of the
1338 file in the users home
1339 directory when connections are opened. The initial
1340 value for this toggle is
1343 Toggles the display of all terminal data (in hexadecimal format).
1344 The initial value for this toggle is
1346 .It Ic verbose_encrypt
1352 prints out a message each time encryption is enabled or
1353 disabled. The initial value for this toggle is
1363 This command only works when the user is using the
1365 .It Ic \&! Op Ar command
1366 Execute a single command in a subshell on the local
1369 is omitted, then an interactive
1370 subshell is invoked.
1371 .It Ic ?\& Op Ar command
1372 Get help. With no arguments,
1374 prints a help summary.
1379 will print the help information for just that command.
1384 utility uses at least the
1390 environment variables.
1391 Other environment variables may be propagated
1392 to the other side via the
1396 .Bl -tag -width ~/.telnetrc -compact
1398 user customized telnet startup values
1412 IPv6 support was added by WIDE/KAME project.
1414 On some remote systems, echo has to be turned off manually when in
1415 \*(Lqold line by line\*(Rq mode.
1417 In \*(Lqold line by line\*(Rq mode or
1421 character is only recognized (and sent to the remote system)
1422 when it is the first character on a line.