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.
148 If Kerberos authentication is being used, the
150 option requests that telnet obtain tickets for the remote host in
151 realm realm instead of the remote host's realm, as determined
153 .Xr krb_realmofhost 3 .
155 When connecting to the remote system, if the remote system
160 will be sent to the remote system as the value for the variable USER.
161 This option implies the
164 This option may also be used with the
167 .It Fl n Ar tracefile
170 for recording trace information.
175 Specifies a user interface similar to
178 mode, the escape character is set to the tilde (~) character,
179 unless modified by the -e option.
181 Turns on encryption of the data stream if possible. This is
182 currently the default and when it fails a warning is issued.
184 Indicates the official name, an alias, or the Internet address
187 Indicates a port number (address of an application). If a number is
188 not specified, the default
193 When in rlogin mode, a line of the form ~. disconnects from the
194 remote host; ~ is the telnet escape character.
195 Similarly, the line ~^Z suspends the telnet session.
196 The line ~^] escapes to the normal telnet escape prompt.
198 Once a connection has been opened,
200 will attempt to enable the
205 will revert to one of two input modes:
206 either \*(Lqcharacter at a time\*(Rq
207 or \*(Lqold line by line\*(Rq
208 depending on what the remote system supports.
212 is enabled, character processing is done on the
213 local system, under the control of the remote system. When input
214 editing or character echoing is to be disabled, the remote system
215 will relay that information. The remote system will also relay
216 changes to any special characters that happen on the remote
217 system, so that they can take effect on the local system.
219 In \*(Lqcharacter at a time\*(Rq mode, most
220 text typed is immediately sent to the remote host for processing.
222 In \*(Lqold line by line\*(Rq mode, all text is echoed locally,
223 and (normally) only completed lines are sent to the remote host.
224 The \*(Lqlocal echo character\*(Rq (initially \*(Lq^E\*(Rq) may be used
225 to turn off and on the local echo
226 (this would mostly be used to enter passwords
227 without the password being echoed).
231 option is enabled, or if the
235 (the default for \*(Lqold line by line\*(Lq; see below),
241 characters are trapped locally, and sent as
243 protocol sequences to the remote side.
246 has ever been enabled, then the user's
259 There are options (see
266 which cause this action to flush subsequent output to the terminal
267 (until the remote host acknowledges the
269 sequence) and flush previous terminal input
275 While connected to a remote host,
277 command mode may be entered by typing the
279 \*(Lqescape character\*(Rq (initially \*(Lq^]\*(Rq).
280 When in command mode, the normal terminal editing conventions are available.
284 commands are available.
285 Only enough of each command to uniquely identify it need be typed
286 (this is also true for arguments to the
297 .Bl -tag -width "mode type"
298 .It Ic auth Ar argument ...
299 The auth command manipulates the information sent through the
300 .Dv TELNET AUTHENTICATE
301 option. Valid arguments for the
302 auth command are as follows:
303 .Bl -tag -width "disable type"
304 .It Ic disable Ar type
305 Disables the specified type of authentication. To
306 obtain a list of available types, use the
309 .It Ic enable Ar type
310 Enables the specified type of authentication. To
311 obtain a list of available types, use the
315 Lists the current status of the various types of
321 session and return to command mode.
322 .It Ic display Ar argument ...
323 Displays all, or some, of the
328 .It Ic encrypt Ar argument ...
329 The encrypt command manipulates the information sent through the
333 Note: Because of export controls, the
335 option is not supported outside of the United States and Canada.
337 Valid arguments for the encrypt command are as follows:
339 .It Ic disable Ar type Xo
340 .Op Cm input | output
342 Disables the specified type of encryption. If you
343 omit the input and output, both input and output
344 are disabled. To obtain a list of available
346 .Ic encrypt disable ?\&
348 .It Ic enable Ar type Xo
349 .Op Cm input | output
351 Enables the specified type of encryption. If you
352 omit input and output, both input and output are
353 enabled. To obtain a list of available types, use the
354 .Ic encrypt enable ?\&
357 This is the same as the
358 .Ic encrypt start input
361 This is the same as the
362 .Ic encrypt stop input
365 This is the same as the
366 .Ic encrypt start output
369 This is the same as the
370 .Ic encrypt stop output
372 .It Ic start Op Cm input | output
373 Attempts to start encryption. If you omit
377 both input and output are enabled. To
378 obtain a list of available types, use the
379 .Ic encrypt enable ?\&
382 Lists the current status of encryption.
383 .It Ic stop Op Cm input | output
384 Stops encryption. If you omit input and output,
385 encryption is on both input and output.
387 Sets the default type of encryption to be used
394 .It Ic environ Ar arguments ...
397 command is used to manipulate the
398 the variables that my be sent through the
401 The initial set of variables is taken from the users
402 environment, with only the
406 variables being exported by default.
409 variable is also exported if the
415 Valid arguments for the
419 .It Ic define Ar variable value
424 Any variables defined by this command are automatically exported.
427 may be enclosed in single or double quotes so
428 that tabs and spaces may be included.
429 .It Ic undefine Ar variable
432 from the list of environment variables.
433 .It Ic export Ar variable
436 to be exported to the remote side.
437 .It Ic unexport Ar variable
440 to not be exported unless
441 explicitly asked for by the remote side.
443 List the current set of environment variables.
446 will be sent automatically,
447 other variables will only be sent if explicitly requested.
449 Prints out help information for the
456 option to the remote side.
457 This command is similar to a
459 command; however, if the remote side does not support the
461 option, nothing happens.
462 If, however, the remote side does support the
464 option, this command should cause the remote side to close the
467 If the remote side also supports the concept of
468 suspending a user's session for later reattachment,
469 the logout argument indicates that you
470 should terminate the session immediately.
473 is one of several options, depending on the state of the
476 The remote host is asked for permission to go into the requested mode.
477 If the remote host is capable of entering that mode, the requested
478 mode will be entered.
483 option, or, if the remote side does not understand the
485 option, then enter \*(Lqcharacter at a time\*(Lq mode.
489 option, or, if the remote side does not understand the
491 option, then attempt to enter \*(Lqold-line-by-line\*(Lq mode.
492 .It Ic isig Pq Ic \-isig
493 Attempt to enable (disable) the
498 This requires that the
501 .It Ic edit Pq Ic \-edit
502 Attempt to enable (disable) the
507 This requires that the
510 .It Ic softtabs Pq Ic \-softtabs
511 Attempt to enable (disable) the
516 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.
655 (Interrupt Process) sequence, which should cause the remote
656 system to abort the currently running process.
671 This sequence causes the remote system to discard all previously typed
672 (but not yet read) input.
673 This sequence is sent as
676 data (and may not work if the remote system is a
679 it doesn't work, a lower case \*(Lqr\*(Rq may be echoed on the terminal).
689 can be either a decimal number between 0 and 255,
690 or a symbolic name for a specific
698 to print out help information, including
699 a list of known symbolic names.
701 Prints out help information for the
705 .It Ic set Ar argument value
706 .It Ic unset Ar argument value
709 command will set any one of a number of
711 variables to a specific value or to
715 turns off the function associated with
716 the variable, this is equivalent to using the
721 command will disable or set to
723 any of the specified functions.
724 The values of variables may be interrogated with the
727 The variables which may be set or unset, but not toggled, are
728 listed here. In addition, any of the variables for the
730 command may be explicitly set or unset using
736 .Bl -tag -width escape
740 is in localchars mode, or
742 is enabled, and the status character is typed, a
746 preceding) is sent to the
747 remote host. The initial value for the "Are You There"
748 character is the terminal's status character.
750 This is the value (initially \*(Lq^E\*(Rq) which, when in
751 \*(Lqline by line\*(Rq mode, toggles between doing local echoing
752 of entered characters (for normal processing), and suppressing
753 echoing of entered characters (for entering, say, a password).
759 or \*(Lqold line by line\*(Rq mode, entering this character
760 as the first character on a line will cause this character to be
761 sent to the remote system.
762 The initial value of the eof character is taken to be the terminal's
777 is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
778 character is typed, a
784 is sent to the remote system.
785 The initial value for the erase character is taken to be
792 escape character (initially \*(Lq^[\*(Rq) which causes entry
795 command mode (when connected to a remote system).
807 character is typed, a
813 is sent to the remote host.
814 The initial value for the flush character is taken to be
825 characters that, when typed, cause partial lines to be
826 forwarded to the remote system. The initial value for
827 the forwarding characters are taken from the terminal's
828 eol and eol2 characters.
840 character is typed, a
846 is sent to the remote host.
847 The initial value for the interrupt character is taken to be
863 is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
864 character is typed, a
870 is sent to the remote system.
871 The initial value for the kill character is taken to be
880 or \*(Lqold line by line\*(Lq mode, then this character is taken to
884 The initial value for the lnext character is taken to be
899 character is typed, a
905 is sent to the remote host.
906 The initial value for the quit character is taken to be
915 or \*(Lqold line by line\*(Lq mode, then this character is taken to
919 The initial value for the reprint character is taken to be
924 This is the rlogin escape character.
927 escape character is ignored unless it is
928 preceded by this character at the beginning of a line.
929 This character, at the beginning of a line followed by
930 a "." closes the connection; when followed by a ^Z it
931 suspends the telnet command. The initial state is to
932 disable the rlogin escape character.
935 .Dv TELNET TOGGLE-FLOW-CONTROL
936 option has been enabled,
937 then this character is taken to
941 The initial value for the kill character is taken to be
947 .Dv TELNET TOGGLE-FLOW-CONTROL
948 option has been enabled,
949 then this character is taken to
953 The initial value for the kill character is taken to be
966 character is typed, a
972 is sent to the remote host.
973 The initial value for the suspend character is taken to be
979 This is the file to which the output, caused by
985 will be written. If it is set to
987 then tracing information will be written to standard output (the default).
993 or \*(Lqold line by line\*(Lq mode, then this character is taken to
997 The initial value for the worderase character is taken to be
1010 command (Set Local Characters) is used to set
1011 or change the state of the the special
1015 been enabled. Special characters are characters that get
1018 commands sequences (like
1022 or line editing characters (like
1026 By default, the local special characters are exported.
1029 Verify the current settings for the current special characters.
1030 The remote side is requested to send all the current special
1031 character settings, and if there are any discrepancies with
1032 the local side, the local side will switch to the remote value.
1034 Switch to the local defaults for the special characters. The
1035 local default characters are those of the local terminal at
1040 Switch to the remote defaults for the special characters.
1041 The remote default characters are those of the remote system
1042 at the time when the
1044 connection was established.
1046 Prints out help information for the
1051 Show the current status of
1053 This includes the peer one is connected to, as well
1054 as the current mode.
1055 .It Ic toggle Ar arguments ...
1060 various flags that control how
1063 These flags may be set explicitly to
1071 commands listed above.
1072 More than one argument may be specified.
1073 The state of these flags may be interrogated with the
1076 Valid arguments are:
1079 Turns on debugging information for the authentication code.
1091 characters are recognized (and transformed into
1097 refuses to display any data on the user's terminal
1098 until the remote system acknowledges (via a
1099 .Dv TELNET TIMING MARK
1101 that it has processed those
1104 The initial value for this toggle is
1106 if the terminal user had not
1107 done an "stty noflsh", otherwise
1114 option is negotiated, by
1115 default the actual encryption (decryption) of the data
1116 stream does not start automatically. The autoencrypt
1117 (autodecrypt) command states that encryption of the
1118 output (input) stream should be enabled as soon as
1122 Note: Because of export controls, the
1124 option is not supported outside the United States and Canada.
1126 If the remote side supports the
1127 .Dv TELNET AUTHENTICATION
1130 attempts to use it to perform automatic authentication. If the
1132 option is not supported, the user's login
1133 name are propagated through the
1136 This command is the same as specifying
1148 then when either the
1152 characters is typed (see
1154 above for descriptions of the
1158 characters), the resulting
1160 sequence sent is followed by the
1165 cause the remote system to begin throwing away all previously
1166 typed input until both of the
1168 sequences have been read and acted upon.
1169 The initial value of this toggle is
1172 Enable or disable the
1174 option on both input and output.
1176 Enable or disable the
1180 Enable or disable the
1186 then carriage returns will be sent as
1190 then carriage returns will be send as
1192 The initial value for this toggle is
1195 Toggle carriage return mode.
1196 When this mode is enabled, most carriage return characters received from
1197 the remote host will be mapped into a carriage return followed by
1199 This mode does not affect those characters typed by the user, only
1200 those received from the remote host.
1201 This mode is not very useful unless the remote host
1202 only sends carriage return, but never line feed.
1203 The initial value for this toggle is
1206 Toggles socket level debugging (useful only to the
1208 The initial value for this toggle is
1211 Turns on debugging information for the encryption code.
1224 above) are recognized locally, and transformed into (hopefully) appropriate
1237 The initial value for this toggle is
1239 in \*(Lqold line by line\*(Rq mode,
1242 in \*(Lqcharacter at a time\*(Rq mode.
1245 option is enabled, the value of
1247 is ignored, and assumed to always be
1251 has ever been enabled, then
1267 Toggles the display of all network data (in hexadecimal format).
1268 The initial value for this toggle is
1271 Toggles the display of some internal
1273 protocol processing (having to do with
1276 The initial value for this toggle is
1282 toggle is enabled, if
1284 is enabled the output from the
1286 command will be formatted in a more user readable format.
1287 Spaces are put between each character in the output, and the
1290 escape sequence is preceded by a '*' to aid in locating them.
1292 When the skiprc toggle is
1295 skips the reading of the
1297 file in the users home
1298 directory when connections are opened. The initial
1299 value for this toggle is
1302 Toggles the display of all terminal data (in hexadecimal format).
1303 The initial value for this toggle is
1305 .It Ic verbose_encrypt
1311 prints out a message each time encryption is enabled or
1312 disabled. The initial value for this toggle is
1314 Note: Because of export controls, data encryption
1315 is not supported outside of the United States and Canada.
1324 This command only works when the user is using the
1326 .It Ic \&! Op Ar command
1327 Execute a single command in a subshell on the local
1330 is omitted, then an interactive
1331 subshell is invoked.
1332 .It Ic ?\& Op Ar command
1333 Get help. With no arguments,
1335 prints a help summary.
1336 If a command is specified,
1338 will print the help information for just that command.
1348 environment variables.
1349 Other environment variables may be propagated
1350 to the other side via the
1354 .Bl -tag -width ~/.telnetrc -compact
1356 user customized telnet startup values
1365 On some remote systems, echo has to be turned off manually when in
1366 \*(Lqold line by line\*(Rq mode.
1368 In \*(Lqold line by line\*(Rq mode or
1372 character is only recognized (and sent to the remote system)
1373 when it is the first character on a line.