1 .\" Copyright (c) 1983, 1990, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)telnet.1 8.6 (Berkeley) 6/1/94
39 .Nd user interface to the
47 .Op Fl e Ar escapechar
59 is used to communicate with another host using the
64 is invoked without the
66 argument, it enters command mode,
67 indicated by its prompt
69 In this mode, it accepts and executes the commands listed below.
70 If it is invoked with arguments, it performs an
72 command with those arguments.
75 .Bl -tag -width indent
77 Specifies an 8-bit data path. This causes an attempt to
80 option on both input and output.
82 Do not try to negotiate
86 Stops any character from being recognized as an escape character.
88 If Kerberos V5 authentication is being used, the
90 option allows the local credentials to be forwarded
91 to the remote system, including any credentials that
92 have already been forwarded into the local environment.
94 Specifies no automatic login to the remote system.
96 Specifies an 8-bit data path on output. This causes the
97 BINARY option to be negotiated on output.
99 Sets the IP type-of-service (TOS) option for the telnet
100 connection to the value
102 which can be a numeric TOS value
103 or, on systems that support it, a symbolic
104 TOS name found in the /etc/iptos file.
108 type of authentication.
110 Attempt automatic login.
111 Currently, this sends the user name via the
116 option if supported by the remote system.
117 The name used is that of the current user as returned by
119 if it agrees with the current user ID,
120 otherwise it is the name associated with the user ID.
122 Disables the reading of the user's
126 command on this man page.)
128 Sets the initial value of the
132 .It Fl e Ar escape char
141 there will be no escape character.
143 If Kerberos V5 authentication is being used, the
145 option allows the local credentials to be forwarded to the remote system.
147 If Kerberos authentication is being used, the
149 option requests that telnet obtain tickets for the remote host in
150 realm realm instead of the remote host's realm, as determined
152 .Xr krb_realmofhost 3 .
154 When connecting to the remote system, if the remote system
159 will be sent to the remote system as the value for the variable USER.
160 This option implies the
163 This option may also be used with the
166 .It Fl n Ar tracefile
169 for recording trace information.
174 Specifies a user interface similar to
177 mode, the escape character is set to the tilde (~) character,
178 unless modified by the -e option.
180 Turn on encryption of the data stream. When this option is turned on,
182 will exit with an error if authentication cannot be negotiated or if
183 encryption cannot be turned on.
185 Indicates the official name, an alias, or the Internet address
188 Indicates a port number (address of an application). If a number is
189 not specified, the default
194 When in rlogin mode, a line of the form ~. disconnects from the
195 remote host; ~ is the telnet escape character.
196 Similarly, the line ~^Z suspends the telnet session.
197 The line ~^] escapes to the normal telnet escape prompt.
199 Once a connection has been opened,
201 will attempt to enable the
206 will revert to one of two input modes:
207 either \*(Lqcharacter at a time\*(Rq
208 or \*(Lqold line by line\*(Rq
209 depending on what the remote system supports.
213 is enabled, character processing is done on the
214 local system, under the control of the remote system. When input
215 editing or character echoing is to be disabled, the remote system
216 will relay that information. The remote system will also relay
217 changes to any special characters that happen on the remote
218 system, so that they can take effect on the local system.
220 In \*(Lqcharacter at a time\*(Rq mode, most
221 text typed is immediately sent to the remote host for processing.
223 In \*(Lqold line by line\*(Rq mode, all text is echoed locally,
224 and (normally) only completed lines are sent to the remote host.
225 The \*(Lqlocal echo character\*(Rq (initially \*(Lq^E\*(Rq) may be used
226 to turn off and on the local echo
227 (this would mostly be used to enter passwords
228 without the password being echoed).
232 option is enabled, or if the
236 (the default for \*(Lqold line by line\*(Lq; see below),
242 characters are trapped locally, and sent as
244 protocol sequences to the remote side.
247 has ever been enabled, then the user's
260 There are options (see
267 which cause this action to flush subsequent output to the terminal
268 (until the remote host acknowledges the
270 sequence) and flush previous terminal input
276 While connected to a remote host,
278 command mode may be entered by typing the
280 \*(Lqescape character\*(Rq (initially \*(Lq^]\*(Rq).
281 When in command mode, the normal terminal editing conventions are available.
285 commands are available.
286 Only enough of each command to uniquely identify it need be typed
287 (this is also true for arguments to the
298 .Bl -tag -width "mode type"
299 .It Ic auth Ar argument ...
300 The auth command manipulates the information sent through the
301 .Dv TELNET AUTHENTICATE
302 option. Valid arguments for the
303 auth command are as follows:
304 .Bl -tag -width "disable type"
305 .It Ic disable Ar type
306 Disables the specified type of authentication. To
307 obtain a list of available types, use the
310 .It Ic enable Ar type
311 Enables the specified type of authentication. To
312 obtain a list of available types, use the
316 Lists the current status of the various types of
322 session and return to command mode.
323 .It Ic display Ar argument ...
324 Displays all, or some, of the
329 .It Ic encrypt Ar argument ...
330 The encrypt command manipulates the information sent through the
334 Note: Because of export controls, the
336 option is not supported outside of the United States and Canada.
338 Valid arguments for the encrypt command are as follows:
340 .It Ic disable Ar type Xo
341 .Op Cm input | output
343 Disables the specified type of encryption. If you
344 omit the input and output, both input and output
345 are disabled. To obtain a list of available
347 .Ic encrypt disable ?\&
349 .It Ic enable Ar type Xo
350 .Op Cm input | output
352 Enables the specified type of encryption. If you
353 omit input and output, both input and output are
354 enabled. To obtain a list of available types, use the
355 .Ic encrypt enable ?\&
358 This is the same as the
359 .Ic encrypt start input
362 This is the same as the
363 .Ic encrypt stop input
366 This is the same as the
367 .Ic encrypt start output
370 This is the same as the
371 .Ic encrypt stop output
373 .It Ic start Op Cm input | output
374 Attempts to start encryption. If you omit
378 both input and output are enabled. To
379 obtain a list of available types, use the
380 .Ic encrypt enable ?\&
383 Lists the current status of encryption.
384 .It Ic stop Op Cm input | output
385 Stops encryption. If you omit input and output,
386 encryption is on both input and output.
388 Sets the default type of encryption to be used
395 .It Ic environ Ar arguments ...
398 command is used to manipulate the
399 the variables that my be sent through the
402 The initial set of variables is taken from the users
403 environment, with only the
407 variables being exported by default.
410 variable is also exported if the
416 Valid arguments for the
420 .It Ic define Ar variable value
425 Any variables defined by this command are automatically exported.
428 may be enclosed in single or double quotes so
429 that tabs and spaces may be included.
430 .It Ic undefine Ar variable
433 from the list of environment variables.
434 .It Ic export Ar variable
437 to be exported to the remote side.
438 .It Ic unexport Ar variable
441 to not be exported unless
442 explicitly asked for by the remote side.
444 List the current set of environment variables.
447 will be sent automatically,
448 other variables will only be sent if explicitly requested.
450 Prints out help information for the
457 option to the remote side.
458 This command is similar to a
460 command; however, if the remote side does not support the
462 option, nothing happens.
463 If, however, the remote side does support the
465 option, this command should cause the remote side to close the
468 If the remote side also supports the concept of
469 suspending a user's session for later reattachment,
470 the logout argument indicates that you
471 should terminate the session immediately.
474 is one of several options, depending on the state of the
477 The remote host is asked for permission to go into the requested mode.
478 If the remote host is capable of entering that mode, the requested
479 mode will be entered.
484 option, or, if the remote side does not understand the
486 option, then enter \*(Lqcharacter at a time\*(Lq mode.
490 option, or, if the remote side does not understand the
492 option, then attempt to enter \*(Lqold-line-by-line\*(Lq mode.
493 .It Ic isig Pq Ic \-isig
494 Attempt to enable (disable) the
499 This requires that the
502 .It Ic edit Pq Ic \-edit
503 Attempt to enable (disable) the
508 This requires that the
511 .It Ic softtabs Pq Ic \-softtabs
512 Attempt to enable (disable) the
517 This requires that the
520 .It Ic litecho Pq Ic \-litecho
521 Attempt to enable (disable) the
526 This requires that the
530 Prints out help information for the
537 .Op Oo Fl Oc Ns Ar port
539 Open a connection to the named host.
543 will attempt to contact a
545 server at the default port.
546 The host specification may be either a host name (see
548 or an Internet address specified in the \*(Lqdot notation\*(Rq (see
552 option may be used to specify the user name
553 to be passed to the remote system via the
556 When connecting to a non-standard port,
558 omits any automatic initiation of
560 options. When the port number is preceded by a minus sign,
561 the initial option negotiation is done.
562 After establishing a connection, the file
565 users home directory is opened. Lines beginning with a # are
566 comment lines. Blank lines are ignored. Lines that begin
567 without white space are the start of a machine entry. The
568 first thing on the line is the name of the machine that is
569 being connected to. The rest of the line, and successive
570 lines that begin with white space are assumed to be
572 commands and are processed as if they had been typed
581 An end of file (in command mode) will also close a session and exit.
582 .It Ic send Ar arguments
583 Sends one or more special character sequences to the remote host.
584 The following are the arguments which may be specified
585 (more than one argument may be specified at a time):
587 .Bl -tag -width escape
597 (Abort Output) sequence, which should cause the remote system to flush
607 sequence, to which the remote system may or may not choose to respond.
611 (Break) sequence, which may have significance to the remote
617 sequence, which should cause the remote system to erase the last character
623 sequence, which should cause the remote system to erase the line currently
638 escape character (initially \*(Lq^\*(Rq).
643 sequence, which likely has no significance to the remote system.
645 If the remote side supports the
649 will send the subnegotiation to request that the server send
650 its current option status.
654 (Interrupt Process) sequence, which should cause the remote
655 system to abort the currently running process.
670 This sequence causes the remote system to discard all previously typed
671 (but not yet read) input.
672 This sequence is sent as
675 data (and may not work if the remote system is a
678 it doesn't work, a lower case \*(Lqr\*(Rq may be echoed on the terminal).
688 can be either a decimal number between 0 and 255,
689 or a symbolic name for a specific
697 to print out help information, including
698 a list of known symbolic names.
700 Prints out help information for the
704 .It Ic set Ar argument value
705 .It Ic unset Ar argument value
708 command will set any one of a number of
710 variables to a specific value or to
714 turns off the function associated with
715 the variable, this is equivalent to using the
720 command will disable or set to
722 any of the specified functions.
723 The values of variables may be interrogated with the
726 The variables which may be set or unset, but not toggled, are
727 listed here. In addition, any of the variables for the
729 command may be explicitly set or unset using
735 .Bl -tag -width escape
739 is in localchars mode, or
741 is enabled, and the status character is typed, a
745 preceding) is sent to the
746 remote host. The initial value for the "Are You There"
747 character is the terminal's status character.
749 This is the value (initially \*(Lq^E\*(Rq) which, when in
750 \*(Lqline by line\*(Rq mode, toggles between doing local echoing
751 of entered characters (for normal processing), and suppressing
752 echoing of entered characters (for entering, say, a password).
758 or \*(Lqold line by line\*(Rq mode, entering this character
759 as the first character on a line will cause this character to be
760 sent to the remote system.
761 The initial value of the eof character is taken to be the terminal's
776 is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
777 character is typed, a
783 is sent to the remote system.
784 The initial value for the erase character is taken to be
791 escape character (initially \*(Lq^[\*(Rq) which causes entry
794 command mode (when connected to a remote system).
806 character is typed, a
812 is sent to the remote host.
813 The initial value for the flush character is taken to be
824 characters that, when typed, cause partial lines to be
825 forwarded to the remote system. The initial value for
826 the forwarding characters are taken from the terminal's
827 eol and eol2 characters.
839 character is typed, a
845 is sent to the remote host.
846 The initial value for the interrupt character is taken to be
862 is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
863 character is typed, a
869 is sent to the remote system.
870 The initial value for the kill character is taken to be
879 or \*(Lqold line by line\*(Lq mode, then this character is taken to
883 The initial value for the lnext character is taken to be
898 character is typed, a
904 is sent to the remote host.
905 The initial value for the quit character is taken to be
914 or \*(Lqold line by line\*(Lq mode, then this character is taken to
918 The initial value for the reprint character is taken to be
923 This is the rlogin escape character.
926 escape character is ignored unless it is
927 preceded by this character at the beginning of a line.
928 This character, at the beginning of a line followed by
929 a "." closes the connection; when followed by a ^Z it
930 suspends the telnet command. The initial state is to
931 disable the rlogin escape character.
934 .Dv TELNET TOGGLE-FLOW-CONTROL
935 option has been enabled,
936 then this character is taken to
940 The initial value for the kill character is taken to be
946 .Dv TELNET TOGGLE-FLOW-CONTROL
947 option has been enabled,
948 then this character is taken to
952 The initial value for the kill character is taken to be
965 character is typed, a
971 is sent to the remote host.
972 The initial value for the suspend character is taken to be
977 This is the file to which the output, caused by
983 will be written. If it is set to
985 then tracing information will be written to standard output (the default).
991 or \*(Lqold line by line\*(Lq mode, then this character is taken to
995 The initial value for the worderase character is taken to be
1008 command (Set Local Characters) is used to set
1009 or change the state of the the special
1013 been enabled. Special characters are characters that get
1016 commands sequences (like
1020 or line editing characters (like
1024 By default, the local special characters are exported.
1027 Verify the current settings for the current special characters.
1028 The remote side is requested to send all the current special
1029 character settings, and if there are any discrepancies with
1030 the local side, the local side will switch to the remote value.
1032 Switch to the local defaults for the special characters. The
1033 local default characters are those of the local terminal at
1038 Switch to the remote defaults for the special characters.
1039 The remote default characters are those of the remote system
1040 at the time when the
1042 connection was established.
1044 Prints out help information for the
1049 Show the current status of
1051 This includes the peer one is connected to, as well
1052 as the current mode.
1053 .It Ic toggle Ar arguments ...
1058 various flags that control how
1061 These flags may be set explicitly to
1069 commands listed above.
1070 More than one argument may be specified.
1071 The state of these flags may be interrogated with the
1074 Valid arguments are:
1077 Turns on debugging information for the authentication code.
1089 characters are recognized (and transformed into
1095 refuses to display any data on the user's terminal
1096 until the remote system acknowledges (via a
1097 .Dv TELNET TIMING MARK
1099 that it has processed those
1102 The initial value for this toggle is
1104 if the terminal user had not
1105 done an "stty noflsh", otherwise
1112 option is negotiated, by
1113 default the actual encryption (decryption) of the data
1114 stream does not start automatically. The autoencrypt
1115 (autodecrypt) command states that encryption of the
1116 output (input) stream should be enabled as soon as
1119 Note: Because of export controls, the
1121 option is not supported outside the United States and Canada.
1123 If the remote side supports the
1124 .Dv TELNET AUTHENTICATION
1127 attempts to use it to perform automatic authentication. If the
1129 option is not supported, the user's login
1130 name are propagated through the
1133 This command is the same as specifying
1145 then when either the
1149 characters is typed (see
1151 above for descriptions of the
1155 characters), the resulting
1157 sequence sent is followed by the
1162 cause the remote system to begin throwing away all previously
1163 typed input until both of the
1165 sequences have been read and acted upon.
1166 The initial value of this toggle is
1169 Enable or disable the
1171 option on both input and output.
1173 Enable or disable the
1177 Enable or disable the
1183 then carriage returns will be sent as
1184 .Li \*[Lt]CR\*[Gt]\*[Lt]LF\*[Gt] .
1187 then carriage returns will be send as
1188 .Li \*[Lt]CR\*[Gt]\*[Lt]NUL\*[Gt] .
1189 The initial value for this toggle is
1192 Toggle carriage return mode.
1193 When this mode is enabled, most carriage return characters received from
1194 the remote host will be mapped into a carriage return followed by
1196 This mode does not affect those characters typed by the user, only
1197 those received from the remote host.
1198 This mode is not very useful unless the remote host
1199 only sends carriage return, but never line feed.
1200 The initial value for this toggle is
1203 Toggles socket level debugging (useful only to the
1205 The initial value for this toggle is
1208 Turns on debugging information for the encryption code.
1221 above) are recognized locally, and transformed into (hopefully) appropriate
1234 The initial value for this toggle is
1236 in \*(Lqold line by line\*(Rq mode,
1239 in \*(Lqcharacter at a time\*(Rq mode.
1242 option is enabled, the value of
1244 is ignored, and assumed to always be
1248 has ever been enabled, then
1264 Toggles the display of all network data (in hexadecimal format).
1265 The initial value for this toggle is
1268 Toggles the display of some internal
1270 protocol processing (having to do with
1273 The initial value for this toggle is
1278 toggle is enabled, if
1280 is enabled the output from the
1282 command will be formatted in a more user readable format.
1283 Spaces are put between each character in the output, and the
1286 escape sequence is preceded by a '*' to aid in locating them.
1288 When the skiprc toggle is
1291 skips the reading of the
1293 file in the users home
1294 directory when connections are opened. The initial
1295 value for this toggle is
1298 Toggles the display of all terminal data (in hexadecimal format).
1299 The initial value for this toggle is
1301 .It Ic verbose_encrypt
1307 prints out a message each time encryption is enabled or
1308 disabled. The initial value for this toggle is
1310 Note: Because of export controls, data encryption
1311 is not supported outside of the United States and Canada.
1320 This command only works when the user is using the
1322 .It Ic \&! Op Ar command
1323 Execute a single command in a subshell on the local
1326 is omitted, then an interactive
1327 subshell is invoked.
1328 .It Ic ?\& Op Ar command
1329 Get help. With no arguments,
1331 prints a help summary.
1332 If a command is specified,
1334 will print the help information for just that command.
1344 environment variables.
1345 Other environment variables may be propagated
1346 to the other side via the
1350 .Bl -tag -width ~/.telnetrc -compact
1352 user customized telnet startup values
1361 On some remote systems, echo has to be turned off manually when in
1362 \*(Lqold line by line\*(Rq mode.
1364 In \*(Lqold line by line\*(Rq mode or
1368 character is only recognized (and sent to the remote system)
1369 when it is the first character on a line.