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 Ic [input|output]
340 Disables the specified type of encryption. If you
341 omit the input and output, both input and output
342 are disabled. To obtain a list of available
344 .Ic encrypt disable \&?
346 .It Ic enable Ar type Ic [input|output]
347 Enables the specified type of encryption. If you
348 omit input and output, both input and output are
349 enabled. To obtain a list of available types, use the
350 .Ic encrypt enable \&?
353 This is the same as the
354 .Ic encrypt start input
357 This is the same as the
358 .Ic encrypt stop input
361 This is the same as the
362 .Ic encrypt start output
365 This is the same as the
366 .Ic encrypt stop output
368 .It Ic start Ic [input|output]
369 Attempts to start encryption. If you omit
373 both input and output are enabled. To
374 obtain a list of available types, use the
375 .Ic encrypt enable \&?
378 Lists the current status of encryption.
379 .It Ic stop Ic [input|output]
380 Stops encryption. If you omit input and output,
381 encryption is on both input and output.
383 Sets the default type of encryption to be used
390 .It Ic environ Ar arguments...
393 command is used to manipulate the
394 the variables that my be sent through the
397 The initial set of variables is taken from the users
398 environment, with only the
402 variables being exported by default.
405 variable is also exported if the
411 Valid arguments for the
415 .It Ic define Ar variable value
420 Any variables defined by this command are automatically exported.
423 may be enclosed in single or double quotes so
424 that tabs and spaces may be included.
425 .It Ic undefine Ar variable
428 from the list of environment variables.
429 .It Ic export Ar variable
432 to be exported to the remote side.
433 .It Ic unexport Ar variable
436 to not be exported unless
437 explicitly asked for by the remote side.
439 List the current set of environment variables.
442 will be sent automatically,
443 other variables will only be sent if explicitly requested.
445 Prints out help information for the
452 option to the remote side.
453 This command is similar to a
455 command; however, if the remote side does not support the
457 option, nothing happens.
458 If, however, the remote side does support the
460 option, this command should cause the remote side to close the
463 If the remote side also supports the concept of
464 suspending a user's session for later reattachment,
465 the logout argument indicates that you
466 should terminate the session immediately.
469 is one of several options, depending on the state of the
472 The remote host is asked for permission to go into the requested mode.
473 If the remote host is capable of entering that mode, the requested
474 mode will be entered.
479 option, or, if the remote side does not understand the
481 option, then enter \*(Lqcharacter at a time\*(Lq mode.
485 option, or, if the remote side does not understand the
487 option, then attempt to enter \*(Lqold-line-by-line\*(Lq mode.
488 .It Ic isig Pq Ic \-isig
489 Attempt to enable (disable) the
494 This requires that the
497 .It Ic edit Pq Ic \-edit
498 Attempt to enable (disable) the
503 This requires that the
506 .It Ic softtabs Pq Ic \-softtabs
507 Attempt to enable (disable) the
512 This requires that the
516 .It Ic litecho Pq Ic \-litecho
517 Attempt to enable (disable) the
522 This requires that the
526 Prints out help information for the
537 Open a connection to the named host.
541 will attempt to contact a
543 server at the default port.
544 The host specification may be either a host name (see
546 or an Internet address specified in the \*(Lqdot notation\*(Rq (see
550 option may be used to specify the user name
551 to be passed to the remote system via the
554 When connecting to a non-standard port,
556 omits any automatic initiation of
558 options. When the port number is preceded by a minus sign,
559 the initial option negotiation is done.
560 After establishing a connection, the file
563 users home directory is opened. Lines beginning with a # are
564 comment lines. Blank lines are ignored. Lines that begin
565 without white space are the start of a machine entry. The
566 first thing on the line is the name of the machine that is
567 being connected to. The rest of the line, and successive
568 lines that begin with white space are assumed to be
570 commands and are processed as if they had been typed
579 An end of file (in command mode) will also close a session and exit.
580 .It Ic send Ar arguments
581 Sends one or more special character sequences to the remote host.
582 The following are the arguments which may be specified
583 (more than one argument may be specified at a time):
585 .Bl -tag -width escape
595 (Abort Output) sequence, which should cause the remote system to flush
605 sequence, to which the remote system may or may not choose to respond.
609 (Break) sequence, which may have significance to the remote
615 sequence, which should cause the remote system to erase the last character
621 sequence, which should cause the remote system to erase the line currently
636 escape character (initially \*(Lq^\*(Rq).
641 sequence, which likely has no significance to the remote system.
643 If the remote side supports the
647 will send the subnegotiation to request that the server send
648 its current option status.
653 (Interrupt Process) sequence, which should cause the remote
654 system to abort the currently running process.
669 This sequence causes the remote system to discard all previously typed
670 (but not yet read) input.
671 This sequence is sent as
674 data (and may not work if the remote system is a
677 it doesn't work, a lower case \*(Lqr\*(Rq may be echoed on the terminal).
687 can be either a decimal number between 0 and 255,
688 or a symbolic name for a specific
696 to print out help information, including
697 a list of known symbolic names.
699 Prints out help information for the
703 .It Ic set Ar argument value
704 .It Ic unset Ar argument value
707 command will set any one of a number of
709 variables to a specific value or to
713 turns off the function associated with
714 the variable, this is equivalent to using the
719 command will disable or set to
721 any of the specified functions.
722 The values of variables may be interrogated with the
725 The variables which may be set or unset, but not toggled, are
726 listed here. In addition, any of the variables for the
728 command may be explicitly set or unset using
734 .Bl -tag -width escape
738 is in localchars mode, or
740 is enabled, and the status character is typed, a
744 preceding) is sent to the
745 remote host. The initial value for the "Are You There"
746 character is the terminal's status character.
748 This is the value (initially \*(Lq^E\*(Rq) which, when in
749 \*(Lqline by line\*(Rq mode, toggles between doing local echoing
750 of entered characters (for normal processing), and suppressing
751 echoing of entered characters (for entering, say, a password).
757 or \*(Lqold line by line\*(Rq mode, entering this character
758 as the first character on a line will cause this character to be
759 sent to the remote system.
760 The initial value of the eof character is taken to be the terminal's
775 is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
776 character is typed, a
782 is sent to the remote system.
783 The initial value for the erase character is taken to be
790 escape character (initially \*(Lq^[\*(Rq) which causes entry
793 command mode (when connected to a remote system).
805 character is typed, a
811 is sent to the remote host.
812 The initial value for the flush character is taken to be
823 characters that, when typed, cause partial lines to be
824 forwarded to the remote system. The initial value for
825 the forwarding characters are taken from the terminal's
826 eol and eol2 characters.
838 character is typed, a
844 is sent to the remote host.
845 The initial value for the interrupt character is taken to be
861 is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
862 character is typed, a
868 is sent to the remote system.
869 The initial value for the kill character is taken to be
878 or \*(Lqold line by line\*(Lq mode, then this character is taken to
882 The initial value for the lnext character is taken to be
897 character is typed, a
903 is sent to the remote host.
904 The initial value for the quit character is taken to be
913 or \*(Lqold line by line\*(Lq mode, then this character is taken to
917 The initial value for the reprint character is taken to be
922 This is the rlogin escape character.
925 escape character is ignored unless it is
926 preceded by this character at the beginning of a line.
927 This character, at the beginning of a line followed by
928 a "." closes the connection; when followed by a ^Z it
929 suspends the telnet command. The initial state is to
930 disable the rlogin escape character.
933 .Dv TELNET TOGGLE-FLOW-CONTROL
934 option has been enabled,
935 then this character is taken to
939 The initial value for the kill character is taken to be
945 .Dv TELNET TOGGLE-FLOW-CONTROL
946 option has been enabled,
947 then this character is taken to
951 The initial value for the kill character is taken to be
964 character is typed, a
970 is sent to the remote host.
971 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
1120 Note: Because of export controls, the
1122 option is not supported outside the United States and Canada.
1124 If the remote side supports the
1125 .Dv TELNET AUTHENTICATION
1128 attempts to use it to perform automatic authentication. If the
1130 option is not supported, the user's login
1131 name are propagated through the
1134 This command is the same as specifying
1146 then when either the
1150 characters is typed (see
1152 above for descriptions of the
1156 characters), the resulting
1158 sequence sent is followed by the
1163 cause the remote system to begin throwing away all previously
1164 typed input until both of the
1166 sequences have been read and acted upon.
1167 The initial value of this toggle is
1170 Enable or disable the
1172 option on both input and output.
1174 Enable or disable the
1178 Enable or disable the
1184 then carriage returns will be sent as
1188 then carriage returns will be send as
1190 The initial value for this toggle is
1193 Toggle carriage return mode.
1194 When this mode is enabled, most carriage return characters received from
1195 the remote host will be mapped into a carriage return followed by
1197 This mode does not affect those characters typed by the user, only
1198 those received from the remote host.
1199 This mode is not very useful unless the remote host
1200 only sends carriage return, but never line feed.
1201 The initial value for this toggle is
1204 Toggles socket level debugging (useful only to the
1206 The initial value for this toggle is
1209 Turns on debugging information for the encryption code.
1222 above) are recognized locally, and transformed into (hopefully) appropriate
1235 The initial value for this toggle is
1237 in \*(Lqold line by line\*(Rq mode,
1240 in \*(Lqcharacter at a time\*(Rq mode.
1243 option is enabled, the value of
1245 is ignored, and assumed to always be
1249 has ever been enabled, then
1263 Toggles the display of all network data (in hexadecimal format).
1264 The initial value for this toggle is
1267 Toggles the display of some internal
1269 protocol processing (having to do with
1272 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.