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. Neither the name of the University nor the names of its contributors
13 .\" may be used to endorse or promote products derived from this software
14 .\" without specific prior written permission.
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" @(#)telnet.1 8.6 (Berkeley) 6/1/94
36 .Nd user interface to the
41 .Op Fl 468EFKLNacdfruxy
45 .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
79 to use IPv4 addresses only.
83 to use IPv6 addresses only.
85 Specifies an 8-bit data path.
86 This causes an attempt to
89 option on both input and output.
94 Stops any character from being recognized as an escape character.
96 If Kerberos V5 authentication is being used, the
98 option allows the local credentials to be forwarded
99 to the remote system, including any credentials that
100 have already been forwarded into the local environment.
102 Specifies no automatic login to the remote system.
104 Specifies an 8-bit data path on output.
107 option to be negotiated on output.
109 Prevents IP address to name lookup when destination host is given
112 Sets the IP type-of-service (TOS) option for the telnet
113 connection to the value
115 which can be a numeric TOS value
116 or, on systems that support it, a symbolic
117 TOS name found in the
123 type of authentication.
125 Attempt automatic login.
126 This is now the default, so this option is ignored.
127 Currently, this sends the user name via the
132 option if supported by the remote system.
133 The name used is that of the current user as returned by
135 if it agrees with the current user ID,
136 otherwise it is the name associated with the user ID.
138 Disables the reading of the user's
143 command on this man page.)
145 Sets the initial value of the
149 .It Fl e Ar escapechar
157 there will be no escape character.
159 If Kerberos V5 authentication is being used, the
161 option allows the local credentials to be forwarded to the remote system.
163 If Kerberos authentication is being used, the
167 obtain tickets for the remote host in
170 instead of the remote host's realm, as determined by
171 .Xr krb_realmofhost 3 .
173 When connecting to the remote system, if the remote system
178 will be sent to the remote system as the value for the variable
180 This option implies the
183 This option may also be used with the
186 .It Fl n Ar tracefile
189 for recording trace information.
194 Use IPsec policy specification string
198 .Xr ipsec_set_policy 3
201 Specifies a user interface similar to
204 mode, the escape character is set to the tilde (~) character,
205 unless modified by the
209 Set the source IP address for the
213 which can be an IP address or a host name.
219 addresses only (e.g.,
221 domain sockets, accessed with a file path).
223 Turns on encryption of the data stream if possible.
224 This is now the default, so this option is ignored.
226 Suppresses encryption of the data stream.
228 Indicates the official name, an alias, or the Internet address
235 establishes a connection to the corresponding named socket.
237 Indicates a port number (address of an application).
239 not specified, the default
244 When in rlogin mode, a line of the form ~.\& disconnects from the
245 remote host; ~ is the
248 Similarly, the line ~^Z suspends the
251 The line ~^] escapes to the normal
255 Once a connection has been opened,
257 will attempt to enable the
262 will revert to one of two input modes:
263 either \*(Lqcharacter at a time\*(Rq
264 or \*(Lqold line by line\*(Rq
265 depending on what the remote system supports.
269 is enabled, character processing is done on the
270 local system, under the control of the remote system.
272 editing or character echoing is to be disabled, the remote system
273 will relay that information.
274 The remote system will also relay
275 changes to any special characters that happen on the remote
276 system, so that they can take effect on the local system.
278 In \*(Lqcharacter at a time\*(Rq mode, most
279 text typed is immediately sent to the remote host for processing.
281 In \*(Lqold line by line\*(Rq mode, all text is echoed locally,
282 and (normally) only completed lines are sent to the remote host.
283 The \*(Lqlocal echo character\*(Rq (initially \*(Lq^E\*(Rq) may be used
284 to turn off and on the local echo
285 (this would mostly be used to enter passwords
286 without the password being echoed).
290 option is enabled, or if the
294 (the default for \*(Lqold line by line\*(Rq; see below),
300 characters are trapped locally, and sent as
302 protocol sequences to the remote side.
305 has ever been enabled, then the user's
318 There are options (see
325 which cause this action to flush subsequent output to the terminal
326 (until the remote host acknowledges the
328 sequence) and flush previous terminal input
334 While connected to a remote host,
336 command mode may be entered by typing the
338 \*(Lqescape character\*(Rq (initially \*(Lq^]\*(Rq).
339 When in command mode, the normal terminal editing conventions are available.
343 commands are available.
344 Only enough of each command to uniquely identify it need be typed
345 (this is also true for arguments to the
355 .Bl -tag -width "mode type"
356 .It Ic auth Ar argument ...
357 The auth command manipulates the information sent through the
358 .Dv TELNET AUTHENTICATE
360 Valid arguments for the
363 .Bl -tag -width "disable type"
364 .It Ic disable Ar type
365 Disables the specified type of authentication.
367 obtain a list of available types, use the
370 .It Ic enable Ar type
371 Enables the specified type of authentication.
373 obtain a list of available types, use the
377 Lists the current status of the various types of
383 session and return to command mode.
384 .It Ic display Ar argument ...
385 Displays all, or some, of the
390 .It Ic encrypt Ar argument ...
391 The encrypt command manipulates the information sent through the
395 Valid arguments for the
399 .It Ic disable Ar type Xo
400 .Op Cm input | output
402 Disables the specified type of encryption.
404 omit the input and output, both input and output
406 To obtain a list of available
408 .Ic encrypt disable ?\&
410 .It Ic enable Ar type Xo
411 .Op Cm input | output
413 Enables the specified type of encryption.
415 omit input and output, both input and output are
417 To obtain a list of available types, use the
418 .Ic encrypt enable ?\&
421 This is the same as the
422 .Ic encrypt start input
425 This is the same as the
426 .Ic encrypt stop input
429 This is the same as the
430 .Ic encrypt start output
433 This is the same as the
434 .Ic encrypt stop output
436 .It Ic start Op Cm input | output
437 Attempts to start encryption.
442 both input and output are enabled.
444 obtain a list of available types, use the
445 .Ic encrypt enable ?\&
448 Lists the current status of encryption.
449 .It Ic stop Op Cm input | output
451 If you omit input and output,
452 encryption is on both input and output.
454 Sets the default type of encryption to be used
461 .It Ic environ Ar arguments ...
464 command is used to manipulate the
465 variables that may be sent through the
468 The initial set of variables is taken from the users
469 environment, with only the
473 variables being exported by default.
476 variable is also exported if the
482 Valid arguments for the
486 .It Ic define Ar variable value
491 Any variables defined by this command are automatically exported.
494 may be enclosed in single or double quotes so
495 that tabs and spaces may be included.
496 .It Ic undefine Ar variable
499 from the list of environment variables.
500 .It Ic export Ar variable
503 to be exported to the remote side.
504 .It Ic unexport Ar variable
507 to not be exported unless
508 explicitly asked for by the remote side.
510 List the current set of environment variables.
513 will be sent automatically,
514 other variables will only be sent if explicitly requested.
516 Prints out help information for the
523 option to the remote side.
524 This command is similar to a
526 command; however, if the remote side does not support the
528 option, nothing happens.
529 If, however, the remote side does support the
531 option, this command should cause the remote side to close the
534 If the remote side also supports the concept of
535 suspending a user's session for later reattachment,
536 the logout argument indicates that you
537 should terminate the session immediately.
540 is one of several options, depending on the state of the
543 The remote host is asked for permission to go into the requested mode.
544 If the remote host is capable of entering that mode, the requested
545 mode will be entered.
550 option, or, if the remote side does not understand the
552 option, then enter \*(Lqcharacter at a time\*(Rq mode.
556 option, or, if the remote side does not understand the
558 option, then attempt to enter \*(Lqold-line-by-line\*(Rq mode.
559 .It Ic isig Pq Ic \-isig
560 Attempt to enable (disable) the
565 This requires that the
568 .It Ic edit Pq Ic \-edit
569 Attempt to enable (disable) the
574 This requires that the
577 .It Ic softtabs Pq Ic \-softtabs
578 Attempt to enable (disable) the
583 This requires that the
586 .It Ic litecho Pq Ic \-litecho
587 Attempt to enable (disable) the
592 This requires that the
596 Prints out help information for the
604 .Op Oo Fl /+ Oc Ns Ar port
606 Open a connection to the named host.
610 will attempt to contact a
612 server at the default port.
613 The host specification may be either a host name (see
615 an Internet address specified in the \*(Lqdot notation\*(Rq (see
617 or IPv6 host name or IPv6 coloned-hexadecimal addreess.
620 option may be used to specify the user name
621 to be passed to the remote system via the
624 When connecting to a non-standard port,
626 omits any automatic initiation of
629 When the port number is preceded by a minus sign,
630 the initial option negotiation is done.
631 When, however, the port number
632 is preceded by a plus sign,
633 any option negotiation and understanding is prohibited,
634 making telnet dumb client for POP3/SMTP/NNTP/HTTP-like
635 protocols with any data including
637 IAC character (0xff).
638 After establishing a connection, the file
641 users home directory is opened.
642 Lines beginning with a # are
644 Blank lines are ignored.
646 without white space are the start of a machine entry.
648 first thing on the line is the name of the machine that is
650 It may be the hostname or numeric address specified as the argument
652 the canonical name of that string as determined by
656 indicating all hosts.
657 The rest of the line, and successive
658 lines that begin with white space are assumed to be
660 commands and are processed as if they had been typed
669 An end of file (in command mode) will also close a session and exit.
670 .It Ic send Ar arguments
671 Sends one or more special character sequences to the remote host.
672 The following are the arguments which may be specified
673 (more than one argument may be specified at a time):
674 .Bl -tag -width escape
684 (Abort Output) sequence, which should cause the remote system to flush
694 sequence, to which the remote system may or may not choose to respond.
698 (Break) sequence, which may have significance to the remote
704 sequence, which should cause the remote system to erase the last character
710 sequence, which should cause the remote system to erase the line currently
725 escape character (initially \*(Lq^\*(Rq).
730 sequence, which likely has no significance to the remote system.
732 If the remote side supports the
736 will send the subnegotiation to request that the server send
737 its current option status.
741 (Interrupt Process) sequence, which should cause the remote
742 system to abort the currently running process.
757 This sequence causes the remote system to discard all previously typed
758 (but not yet read) input.
759 This sequence is sent as
762 data (and may not work if the remote system is a
765 it doesn't work, a lower case \*(Lqr\*(Rq may be echoed on the terminal).
775 can be either a decimal number between 0 and 255,
776 or a symbolic name for a specific
784 to print out help information, including
785 a list of known symbolic names.
787 Prints out help information for the
791 .It Ic set Ar argument value
792 .It Ic unset Ar argument value
795 command will set any one of a number of
797 variables to a specific value or to
801 turns off the function associated with
802 the variable, this is equivalent to using the
807 command will disable or set to
809 any of the specified functions.
810 The values of variables may be interrogated with the
813 The variables which may be set or unset, but not toggled, are
815 In addition, any of the variables for the
817 command may be explicitly set or unset using
823 .Bl -tag -width escape
827 is in localchars mode, or
829 is enabled, and the status character is typed, a
833 preceding) is sent to the
835 The initial value for the \*(LqAre You There\*(Rq
836 character is the terminal's status character.
838 This is the value (initially \*(Lq^E\*(Rq) which, when in
839 \*(Lqline by line\*(Rq mode, toggles between doing local echoing
840 of entered characters (for normal processing), and suppressing
841 echoing of entered characters (for entering, say, a password).
847 or \*(Lqold line by line\*(Rq mode, entering this character
848 as the first character on a line will cause this character to be
849 sent to the remote system.
850 The initial value of the eof character is taken to be the terminal's
865 is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
866 character is typed, a
872 is sent to the remote system.
873 The initial value for the erase character is taken to be
880 escape character (initially \*(Lq^[\*(Rq) which causes entry
883 command mode (when connected to a remote system).
895 character is typed, a
901 is sent to the remote host.
902 The initial value for the flush character is taken to be
913 characters that, when typed, cause partial lines to be
914 forwarded to the remote system.
915 The initial value for
916 the forwarding characters are taken from the terminal's
917 eol and eol2 characters.
929 character is typed, a
935 is sent to the remote host.
936 The initial value for the interrupt character is taken to be
952 is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
953 character is typed, a
959 is sent to the remote system.
960 The initial value for the kill character is taken to be
969 or \*(Lqold line by line\*(Rq mode, then this character is taken to
973 The initial value for the lnext character is taken to be
988 character is typed, a
994 is sent to the remote host.
995 The initial value for the quit character is taken to be
1004 or \*(Lqold line by line\*(Rq mode, then this character is taken to
1008 The initial value for the reprint character is taken to be
1013 This is the rlogin escape character.
1016 escape character is ignored unless it is
1017 preceded by this character at the beginning of a line.
1018 This character, at the beginning of a line followed by
1019 a "." closes the connection; when followed by a ^Z it
1023 The initial state is to
1029 .Dv TELNET TOGGLE-FLOW-CONTROL
1030 option has been enabled,
1031 then this character is taken to
1035 The initial value for the start character is taken to be
1041 .Dv TELNET TOGGLE-FLOW-CONTROL
1042 option has been enabled,
1043 then this character is taken to
1047 The initial value for the stop character is taken to be
1060 character is typed, a
1066 is sent to the remote host.
1067 The initial value for the suspend character is taken to be
1072 This is the file to which the output, caused by
1081 then tracing information will be written to standard output (the default).
1087 or \*(Lqold line by line\*(Rq mode, then this character is taken to
1091 The initial value for the worderase character is taken to be
1101 .It Ic opie Ar sequence challenge
1104 command computes a response to the OPIE challenge.
1108 command (Set Local Characters) is used to set
1109 or change the state of the special
1114 Special characters are characters that get
1117 commands sequences (like
1121 or line editing characters (like
1125 By default, the local special characters are exported.
1128 Verify the current settings for the current special characters.
1129 The remote side is requested to send all the current special
1130 character settings, and if there are any discrepancies with
1131 the local side, the local side will switch to the remote value.
1133 Switch to the local defaults for the special characters.
1135 local default characters are those of the local terminal at
1140 Switch to the remote defaults for the special characters.
1141 The remote default characters are those of the remote system
1142 at the time when the
1144 connection was established.
1146 Prints out help information for the
1151 Show the current status of
1153 This includes the peer one is connected to, as well
1154 as the current mode.
1155 .It Ic toggle Ar arguments ...
1160 various flags that control how
1163 These flags may be set explicitly to
1171 commands listed above.
1172 More than one argument may be specified.
1173 The state of these flags may be interrogated with the
1176 Valid arguments are:
1179 Turns on debugging information for the authentication code.
1191 characters are recognized (and transformed into
1197 refuses to display any data on the user's terminal
1198 until the remote system acknowledges (via a
1199 .Dv TELNET TIMING MARK
1201 that it has processed those
1204 The initial value for this toggle is
1206 if the terminal user had not
1207 done an "stty noflsh", otherwise
1214 option is negotiated, by
1215 default the actual encryption (decryption) of the data
1216 stream does not start automatically.
1218 (autodecrypt) command states that encryption of the
1219 output (input) stream should be enabled as soon as
1222 If the remote side supports the
1223 .Dv TELNET AUTHENTICATION
1226 attempts to use it to perform automatic authentication.
1229 option is not supported, the user's login
1230 name are propagated through the
1233 This command is the same as specifying
1245 then when either the
1249 characters is typed (see
1251 above for descriptions of the
1255 characters), the resulting
1257 sequence sent is followed by the
1262 cause the remote system to begin throwing away all previously
1263 typed input until both of the
1265 sequences have been read and acted upon.
1266 The initial value of this toggle is
1269 Enable or disable the
1271 option on both input and output.
1273 Enable or disable the
1277 Enable or disable the
1283 then carriage returns will be sent as
1287 then carriage returns will be send as
1289 The initial value for this toggle is
1292 Toggle carriage return mode.
1293 When this mode is enabled, most carriage return characters received from
1294 the remote host will be mapped into a carriage return followed by
1296 This mode does not affect those characters typed by the user, only
1297 those received from the remote host.
1298 This mode is not very useful unless the remote host
1299 only sends carriage return, but never line feed.
1300 The initial value for this toggle is
1303 Toggles socket level debugging (useful only to the
1305 The initial value for this toggle is
1308 Turns on debugging information for the encryption code.
1321 above) are recognized locally, and transformed into (hopefully) appropriate
1334 The initial value for this toggle is
1336 in \*(Lqold line by line\*(Rq mode,
1339 in \*(Lqcharacter at a time\*(Rq mode.
1342 option is enabled, the value of
1344 is ignored, and assumed to always be
1348 has ever been enabled, then
1364 Toggles the display of all network data (in hexadecimal format).
1365 The initial value for this toggle is
1368 Toggles the display of some internal
1370 protocol processing (having to do with
1373 The initial value for this toggle is
1378 toggle is enabled, if
1380 is enabled the output from the
1382 command will be formatted in a more user readable format.
1383 Spaces are put between each character in the output, and the
1386 escape sequence is preceded by a '*' to aid in locating them.
1388 When the skiprc toggle is
1391 skips the reading of the
1393 file in the users home
1394 directory when connections are opened.
1396 value for this toggle is
1399 Toggles the display of all terminal data (in hexadecimal format).
1400 The initial value for this toggle is
1402 .It Ic verbose_encrypt
1408 prints out a message each time encryption is enabled or
1410 The initial value for this toggle is
1420 This command only works when the user is using the
1422 .It Ic \&! Op Ar command
1423 Execute a single command in a subshell on the local
1427 is omitted, then an interactive
1428 subshell is invoked.
1429 .It Ic ?\& Op Ar command
1433 prints a help summary.
1438 will print the help information for just that command.
1448 environment variables.
1449 Other environment variables may be propagated
1450 to the other side via the
1454 .Bl -tag -width ~/.telnetrc -compact
1456 user customized telnet startup values
1470 IPv6 support was added by WIDE/KAME project.
1472 On some remote systems, echo has to be turned off manually when in
1473 \*(Lqold line by line\*(Rq mode.
1475 In \*(Lqold line by line\*(Rq mode or
1479 character is only recognized (and sent to the remote system)
1480 when it is the first character on a line.