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
35 .Dd September 18, 2006
40 .Nd user interface to the
45 .Op Fl 468EFKLNacdfruxy
48 .Op Fl e Ar escapechar
61 is used to communicate with another host using the
66 is invoked without the
68 argument, it enters command mode,
69 indicated by its prompt
71 In this mode, it accepts and executes the commands listed below.
72 If it is invoked with arguments, it performs an
74 command with those arguments.
77 .Bl -tag -width indent
81 to use IPv4 addresses only.
85 to use IPv6 addresses only.
87 Specifies an 8-bit data path.
88 This causes an attempt to
91 option on both input and output.
93 Stops any character from being recognized as an escape character.
95 If Kerberos V5 authentication is being used, the
97 option allows the local credentials to be forwarded
98 to the remote system, including any credentials that
99 have already been forwarded into the local environment.
101 Specifies no automatic login to the remote system.
103 Specifies an 8-bit data path on output.
106 option to be negotiated on output.
108 Prevents IP address to name lookup when destination host is given
111 Sets the IP type-of-service (TOS) option for the telnet
112 connection to the value
114 which can be a numeric TOS value
115 or, on systems that support it, a symbolic
116 TOS name found in the
122 type of authentication.
124 Attempt automatic login.
125 This is now the default, so this option is ignored.
126 Currently, this sends the user name via the
131 option if supported by the remote system.
132 The name used is that of the current user as returned by
134 if it agrees with the current user ID,
135 otherwise it is the name associated with the user ID.
137 Disables the reading of the user's
142 command on this man page.)
144 Sets the initial value of the
148 .It Fl e Ar escapechar
156 there will be no escape character.
158 If Kerberos V5 authentication is being used, the
160 option allows the local credentials to be forwarded to the remote system.
162 If Kerberos authentication is being used, the
166 obtain tickets for the remote host in
169 instead of the remote host's realm, as determined by
170 .Xr krb_realmofhost 3 .
172 When connecting to the remote system, if the remote system
177 will be sent to the remote system as the value for the variable
179 This option implies the
182 This option may also be used with the
185 .It Fl n Ar tracefile
188 for recording trace information.
193 Specifies a user interface similar to
196 mode, the escape character is set to the tilde (~) character,
197 unless modified by the
201 Set the source IP address for the
205 which can be an IP address or a host name.
211 addresses only (e.g.,
213 domain sockets, accessed with a file path).
215 Turns on encryption of the data stream if possible.
216 This is now the default, so this option is ignored.
218 Suppresses encryption of the data stream.
220 Indicates the official name, an alias, or the Internet address
227 establishes a connection to the corresponding named socket.
229 Indicates a port number (address of an application).
231 not specified, the default
236 When in rlogin mode, a line of the form ~.\& disconnects from the
237 remote host; ~ is the
240 Similarly, the line ~^Z suspends the
243 The line ~^] escapes to the normal
247 Once a connection has been opened,
249 will attempt to enable the
254 will revert to one of two input modes:
255 either \*(Lqcharacter at a time\*(Rq
256 or \*(Lqold line by line\*(Rq
257 depending on what the remote system supports.
261 is enabled, character processing is done on the
262 local system, under the control of the remote system.
264 editing or character echoing is to be disabled, the remote system
265 will relay that information.
266 The remote system will also relay
267 changes to any special characters that happen on the remote
268 system, so that they can take effect on the local system.
270 In \*(Lqcharacter at a time\*(Rq mode, most
271 text typed is immediately sent to the remote host for processing.
273 In \*(Lqold line by line\*(Rq mode, all text is echoed locally,
274 and (normally) only completed lines are sent to the remote host.
275 The \*(Lqlocal echo character\*(Rq (initially \*(Lq^E\*(Rq) may be used
276 to turn off and on the local echo
277 (this would mostly be used to enter passwords
278 without the password being echoed).
282 option is enabled, or if the
286 (the default for \*(Lqold line by line\*(Rq; see below),
292 characters are trapped locally, and sent as
294 protocol sequences to the remote side.
297 has ever been enabled, then the user's
310 There are options (see
317 which cause this action to flush subsequent output to the terminal
318 (until the remote host acknowledges the
320 sequence) and flush previous terminal input
326 While connected to a remote host,
328 command mode may be entered by typing the
330 \*(Lqescape character\*(Rq (initially \*(Lq^]\*(Rq).
331 When in command mode, the normal terminal editing conventions are available.
335 commands are available.
336 Only enough of each command to uniquely identify it need be typed
337 (this is also true for arguments to the
348 .Bl -tag -width "mode type"
349 .It Ic auth Ar argument ...
350 The auth command manipulates the information sent through the
351 .Dv TELNET AUTHENTICATE
353 Valid arguments for the
356 .Bl -tag -width "disable type"
357 .It Ic disable Ar type
358 Disables the specified type of authentication.
360 obtain a list of available types, use the
363 .It Ic enable Ar type
364 Enables the specified type of authentication.
366 obtain a list of available types, use the
370 Lists the current status of the various types of
376 session and return to command mode.
377 .It Ic display Ar argument ...
378 Displays all, or some, of the
383 .It Ic encrypt Ar argument ...
384 The encrypt command manipulates the information sent through the
388 Valid arguments for the
392 .It Ic disable Ar type Xo
393 .Op Cm input | output
395 Disables the specified type of encryption.
397 omit the input and output, both input and output
399 To obtain a list of available
401 .Ic encrypt disable ?\&
403 .It Ic enable Ar type Xo
404 .Op Cm input | output
406 Enables the specified type of encryption.
408 omit input and output, both input and output are
410 To obtain a list of available types, use the
411 .Ic encrypt enable ?\&
414 This is the same as the
415 .Ic encrypt start input
418 This is the same as the
419 .Ic encrypt stop input
422 This is the same as the
423 .Ic encrypt start output
426 This is the same as the
427 .Ic encrypt stop output
429 .It Ic start Op Cm input | output
430 Attempts to start encryption.
435 both input and output are enabled.
437 obtain a list of available types, use the
438 .Ic encrypt enable ?\&
441 Lists the current status of encryption.
442 .It Ic stop Op Cm input | output
444 If you omit input and output,
445 encryption is on both input and output.
447 Sets the default type of encryption to be used
454 .It Ic environ Ar arguments ...
457 command is used to manipulate the
458 variables that may be sent through the
461 The initial set of variables is taken from the users
462 environment, with only the
466 variables being exported by default.
469 variable is also exported if the
475 Valid arguments for the
479 .It Ic define Ar variable value
484 Any variables defined by this command are automatically exported.
487 may be enclosed in single or double quotes so
488 that tabs and spaces may be included.
489 .It Ic undefine Ar variable
492 from the list of environment variables.
493 .It Ic export Ar variable
496 to be exported to the remote side.
497 .It Ic unexport Ar variable
500 to not be exported unless
501 explicitly asked for by the remote side.
503 List the current set of environment variables.
506 will be sent automatically,
507 other variables will only be sent if explicitly requested.
509 Prints out help information for the
516 option to the remote side.
517 This command is similar to a
519 command; however, if the remote side does not support the
521 option, nothing happens.
522 If, however, the remote side does support the
524 option, this command should cause the remote side to close the
527 If the remote side also supports the concept of
528 suspending a user's session for later reattachment,
529 the logout argument indicates that you
530 should terminate the session immediately.
533 is one of several options, depending on the state of the
536 The remote host is asked for permission to go into the requested mode.
537 If the remote host is capable of entering that mode, the requested
538 mode will be entered.
543 option, or, if the remote side does not understand the
545 option, then enter \*(Lqcharacter at a time\*(Rq mode.
549 option, or, if the remote side does not understand the
551 option, then attempt to enter \*(Lqold-line-by-line\*(Rq mode.
552 .It Ic isig Pq Ic \-isig
553 Attempt to enable (disable) the
558 This requires that the
561 .It Ic edit Pq Ic \-edit
562 Attempt to enable (disable) the
567 This requires that the
570 .It Ic softtabs Pq Ic \-softtabs
571 Attempt to enable (disable) the
576 This requires that the
579 .It Ic litecho Pq Ic \-litecho
580 Attempt to enable (disable) the
585 This requires that the
589 Prints out help information for the
597 .Op Oo Fl /+ Oc Ns Ar port
599 Open a connection to the named host.
603 will attempt to contact a
605 server at the default port.
606 The host specification may be either a host name (see
608 an Internet address specified in the \*(Lqdot notation\*(Rq (see
610 or IPv6 host name or IPv6 coloned-hexadecimal addreess.
613 option may be used to specify the user name
614 to be passed to the remote system via the
617 When connecting to a non-standard port,
619 omits any automatic initiation of
622 When the port number is preceded by a minus sign,
623 the initial option negotiation is done.
624 When, however, the port number
625 is preceded by a plus sign,
626 any option negotiation and understanding is prohibited,
627 making telnet dumb client for POP3/SMTP/NNTP/HTTP-like
628 protocols with any data including
630 IAC character (0xff).
631 After establishing a connection, the file
634 users home directory is opened.
635 Lines beginning with a # are
637 Blank lines are ignored.
639 without white space are the start of a machine entry.
641 first thing on the line is the name of the machine that is
643 It may be the hostname or numeric address specified as the argument
645 the canonical name of that string as determined by
649 indicating all hosts.
650 The rest of the line, and successive
651 lines that begin with white space are assumed to be
653 commands and are processed as if they had been typed
662 An end of file (in command mode) will also close a session and exit.
663 .It Ic send Ar arguments
664 Sends one or more special character sequences to the remote host.
665 The following are the arguments which may be specified
666 (more than one argument may be specified at a time):
668 .Bl -tag -width escape
678 (Abort Output) sequence, which should cause the remote system to flush
688 sequence, to which the remote system may or may not choose to respond.
692 (Break) sequence, which may have significance to the remote
698 sequence, which should cause the remote system to erase the last character
704 sequence, which should cause the remote system to erase the line currently
719 escape character (initially \*(Lq^\*(Rq).
724 sequence, which likely has no significance to the remote system.
726 If the remote side supports the
730 will send the subnegotiation to request that the server send
731 its current option status.
735 (Interrupt Process) sequence, which should cause the remote
736 system to abort the currently running process.
751 This sequence causes the remote system to discard all previously typed
752 (but not yet read) input.
753 This sequence is sent as
756 data (and may not work if the remote system is a
759 it doesn't work, a lower case \*(Lqr\*(Rq may be echoed on the terminal).
769 can be either a decimal number between 0 and 255,
770 or a symbolic name for a specific
778 to print out help information, including
779 a list of known symbolic names.
781 Prints out help information for the
785 .It Ic set Ar argument value
786 .It Ic unset Ar argument value
789 command will set any one of a number of
791 variables to a specific value or to
795 turns off the function associated with
796 the variable, this is equivalent to using the
801 command will disable or set to
803 any of the specified functions.
804 The values of variables may be interrogated with the
807 The variables which may be set or unset, but not toggled, are
809 In addition, any of the variables for the
811 command may be explicitly set or unset using
817 .Bl -tag -width escape
821 is in localchars mode, or
823 is enabled, and the status character is typed, a
827 preceding) is sent to the
829 The initial value for the \*(LqAre You There\*(Rq
830 character is the terminal's status character.
832 This is the value (initially \*(Lq^E\*(Rq) which, when in
833 \*(Lqline by line\*(Rq mode, toggles between doing local echoing
834 of entered characters (for normal processing), and suppressing
835 echoing of entered characters (for entering, say, a password).
841 or \*(Lqold line by line\*(Rq mode, entering this character
842 as the first character on a line will cause this character to be
843 sent to the remote system.
844 The initial value of the eof character is taken to be the terminal's
859 is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
860 character is typed, a
866 is sent to the remote system.
867 The initial value for the erase character is taken to be
874 escape character (initially \*(Lq^[\*(Rq) which causes entry
877 command mode (when connected to a remote system).
889 character is typed, a
895 is sent to the remote host.
896 The initial value for the flush character is taken to be
907 characters that, when typed, cause partial lines to be
908 forwarded to the remote system.
909 The initial value for
910 the forwarding characters are taken from the terminal's
911 eol and eol2 characters.
923 character is typed, a
929 is sent to the remote host.
930 The initial value for the interrupt character is taken to be
946 is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
947 character is typed, a
953 is sent to the remote system.
954 The initial value for the kill character is taken to be
963 or \*(Lqold line by line\*(Rq mode, then this character is taken to
967 The initial value for the lnext character is taken to be
982 character is typed, a
988 is sent to the remote host.
989 The initial value for the quit character is taken to be
998 or \*(Lqold line by line\*(Rq mode, then this character is taken to
1002 The initial value for the reprint character is taken to be
1007 This is the rlogin escape character.
1010 escape character is ignored unless it is
1011 preceded by this character at the beginning of a line.
1012 This character, at the beginning of a line followed by
1013 a "." closes the connection; when followed by a ^Z it
1017 The initial state is to
1023 .Dv TELNET TOGGLE-FLOW-CONTROL
1024 option has been enabled,
1025 then this character is taken to
1029 The initial value for the start character is taken to be
1035 .Dv TELNET TOGGLE-FLOW-CONTROL
1036 option has been enabled,
1037 then this character is taken to
1041 The initial value for the stop character is taken to be
1054 character is typed, a
1060 is sent to the remote host.
1061 The initial value for the suspend character is taken to be
1066 This is the file to which the output, caused by
1075 then tracing information will be written to standard output (the default).
1081 or \*(Lqold line by line\*(Rq mode, then this character is taken to
1085 The initial value for the worderase character is taken to be
1095 .It Ic opie Ar sequence challenge
1098 command computes a response to the OPIE challenge.
1102 command (Set Local Characters) is used to set
1103 or change the state of the special
1108 Special characters are characters that get
1111 commands sequences (like
1115 or line editing characters (like
1119 By default, the local special characters are exported.
1122 Verify the current settings for the current special characters.
1123 The remote side is requested to send all the current special
1124 character settings, and if there are any discrepancies with
1125 the local side, the local side will switch to the remote value.
1127 Switch to the local defaults for the special characters.
1129 local default characters are those of the local terminal at
1134 Switch to the remote defaults for the special characters.
1135 The remote default characters are those of the remote system
1136 at the time when the
1138 connection was established.
1140 Prints out help information for the
1145 Show the current status of
1147 This includes the peer one is connected to, as well
1148 as the current mode.
1149 .It Ic toggle Ar arguments ...
1154 various flags that control how
1157 These flags may be set explicitly to
1165 commands listed above.
1166 More than one argument may be specified.
1167 The state of these flags may be interrogated with the
1170 Valid arguments are:
1173 Turns on debugging information for the authentication code.
1185 characters are recognized (and transformed into
1191 refuses to display any data on the user's terminal
1192 until the remote system acknowledges (via a
1193 .Dv TELNET TIMING MARK
1195 that it has processed those
1198 The initial value for this toggle is
1200 if the terminal user had not
1201 done an "stty noflsh", otherwise
1208 option is negotiated, by
1209 default the actual encryption (decryption) of the data
1210 stream does not start automatically.
1212 (autodecrypt) command states that encryption of the
1213 output (input) stream should be enabled as soon as
1216 If the remote side supports the
1217 .Dv TELNET AUTHENTICATION
1220 attempts to use it to perform automatic authentication.
1223 option is not supported, the user's login
1224 name are propagated through the
1227 This command is the same as specifying
1239 then when either the
1243 characters is typed (see
1245 above for descriptions of the
1249 characters), the resulting
1251 sequence sent is followed by the
1256 cause the remote system to begin throwing away all previously
1257 typed input until both of the
1259 sequences have been read and acted upon.
1260 The initial value of this toggle is
1263 Enable or disable the
1265 option on both input and output.
1267 Enable or disable the
1271 Enable or disable the
1277 then carriage returns will be sent as
1281 then carriage returns will be send as
1283 The initial value for this toggle is
1286 Toggle carriage return mode.
1287 When this mode is enabled, most carriage return characters received from
1288 the remote host will be mapped into a carriage return followed by
1290 This mode does not affect those characters typed by the user, only
1291 those received from the remote host.
1292 This mode is not very useful unless the remote host
1293 only sends carriage return, but never line feed.
1294 The initial value for this toggle is
1297 Toggles socket level debugging (useful only to the
1299 The initial value for this toggle is
1302 Turns on debugging information for the encryption code.
1315 above) are recognized locally, and transformed into (hopefully) appropriate
1328 The initial value for this toggle is
1330 in \*(Lqold line by line\*(Rq mode,
1333 in \*(Lqcharacter at a time\*(Rq mode.
1336 option is enabled, the value of
1338 is ignored, and assumed to always be
1342 has ever been enabled, then
1358 Toggles the display of all network data (in hexadecimal format).
1359 The initial value for this toggle is
1362 Toggles the display of some internal
1364 protocol processing (having to do with
1367 The initial value for this toggle is
1372 toggle is enabled, if
1374 is enabled the output from the
1376 command will be formatted in a more user readable format.
1377 Spaces are put between each character in the output, and the
1380 escape sequence is preceded by a '*' to aid in locating them.
1382 When the skiprc toggle is
1385 skips the reading of the
1387 file in the users home
1388 directory when connections are opened.
1390 value for this toggle is
1393 Toggles the display of all terminal data (in hexadecimal format).
1394 The initial value for this toggle is
1396 .It Ic verbose_encrypt
1402 prints out a message each time encryption is enabled or
1404 The initial value for this toggle is
1414 This command only works when the user is using the
1416 .It Ic \&! Op Ar command
1417 Execute a single command in a subshell on the local
1421 is omitted, then an interactive
1422 subshell is invoked.
1423 .It Ic ?\& Op Ar command
1427 prints a help summary.
1432 will print the help information for just that command.
1442 environment variables.
1443 Other environment variables may be propagated
1444 to the other side via the
1448 .Bl -tag -width ~/.telnetrc -compact
1450 user customized telnet startup values
1464 IPv6 support was added by WIDE/KAME project.
1466 On some remote systems, echo has to be turned off manually when in
1467 \*(Lqold line by line\*(Rq mode.
1469 In \*(Lqold line by line\*(Rq mode or
1473 character is only recognized (and sent to the remote system)
1474 when it is the first character on a line.