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
31 .Dd September 18, 2006
36 .Nd user interface to the
41 .Op Fl 468EFKLNacdfruxy
45 .Op Fl e Ar escapechar
58 is used to communicate with another host using the
63 is invoked without the
65 argument, it enters command mode,
66 indicated by its prompt
68 In this mode, it accepts and executes the commands listed below.
69 If it is invoked with arguments, it performs an
71 command with those arguments.
74 .Bl -tag -width indent
78 to use IPv4 addresses only.
82 to use IPv6 addresses only.
84 Specifies an 8-bit data path.
85 This causes an attempt to
88 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
347 .Bl -tag -width "mode type"
348 .It Ic auth Ar argument ...
349 The auth command manipulates the information sent through the
350 .Dv TELNET AUTHENTICATE
352 Valid arguments for the
355 .Bl -tag -width "disable type"
356 .It Ic disable Ar type
357 Disables the specified type of authentication.
359 obtain a list of available types, use the
362 .It Ic enable Ar type
363 Enables the specified type of authentication.
365 obtain a list of available types, use the
369 Lists the current status of the various types of
375 session and return to command mode.
376 .It Ic display Ar argument ...
377 Displays all, or some, of the
382 .It Ic encrypt Ar argument ...
383 The encrypt command manipulates the information sent through the
387 Valid arguments for the
391 .It Ic disable Ar type Xo
392 .Op Cm input | output
394 Disables the specified type of encryption.
396 omit the input and output, both input and output
398 To obtain a list of available
400 .Ic encrypt disable ?\&
402 .It Ic enable Ar type Xo
403 .Op Cm input | output
405 Enables the specified type of encryption.
407 omit input and output, both input and output are
409 To obtain a list of available types, use the
410 .Ic encrypt enable ?\&
413 This is the same as the
414 .Ic encrypt start input
417 This is the same as the
418 .Ic encrypt stop input
421 This is the same as the
422 .Ic encrypt start output
425 This is the same as the
426 .Ic encrypt stop output
428 .It Ic start Op Cm input | output
429 Attempts to start encryption.
434 both input and output are enabled.
436 obtain a list of available types, use the
437 .Ic encrypt enable ?\&
440 Lists the current status of encryption.
441 .It Ic stop Op Cm input | output
443 If you omit input and output,
444 encryption is on both input and output.
446 Sets the default type of encryption to be used
453 .It Ic environ Ar arguments ...
456 command is used to manipulate the
457 variables that may be sent through the
460 The initial set of variables is taken from the users
461 environment, with only the
465 variables being exported by default.
468 variable is also exported if the
474 Valid arguments for the
478 .It Ic define Ar variable value
483 Any variables defined by this command are automatically exported.
486 may be enclosed in single or double quotes so
487 that tabs and spaces may be included.
488 .It Ic undefine Ar variable
491 from the list of environment variables.
492 .It Ic export Ar variable
495 to be exported to the remote side.
496 .It Ic unexport Ar variable
499 to not be exported unless
500 explicitly asked for by the remote side.
502 List the current set of environment variables.
505 will be sent automatically,
506 other variables will only be sent if explicitly requested.
508 Prints out help information for the
515 option to the remote side.
516 This command is similar to a
518 command; however, if the remote side does not support the
520 option, nothing happens.
521 If, however, the remote side does support the
523 option, this command should cause the remote side to close the
526 If the remote side also supports the concept of
527 suspending a user's session for later reattachment,
528 the logout argument indicates that you
529 should terminate the session immediately.
532 is one of several options, depending on the state of the
535 The remote host is asked for permission to go into the requested mode.
536 If the remote host is capable of entering that mode, the requested
537 mode will be entered.
542 option, or, if the remote side does not understand the
544 option, then enter \*(Lqcharacter at a time\*(Rq mode.
548 option, or, if the remote side does not understand the
550 option, then attempt to enter \*(Lqold-line-by-line\*(Rq mode.
551 .It Ic isig Pq Ic \-isig
552 Attempt to enable (disable) the
557 This requires that the
560 .It Ic edit Pq Ic \-edit
561 Attempt to enable (disable) the
566 This requires that the
569 .It Ic softtabs Pq Ic \-softtabs
570 Attempt to enable (disable) the
575 This requires that the
578 .It Ic litecho Pq Ic \-litecho
579 Attempt to enable (disable) the
584 This requires that the
588 Prints out help information for the
596 .Op Oo Fl /+ Oc Ns Ar port
598 Open a connection to the named host.
602 will attempt to contact a
604 server at the default port.
605 The host specification may be either a host name (see
607 an Internet address specified in the \*(Lqdot notation\*(Rq (see
609 or IPv6 host name or IPv6 coloned-hexadecimal addreess.
612 option may be used to specify the user name
613 to be passed to the remote system via the
616 When connecting to a non-standard port,
618 omits any automatic initiation of
621 When the port number is preceded by a minus sign,
622 the initial option negotiation is done.
623 When, however, the port number
624 is preceded by a plus sign,
625 any option negotiation and understanding is prohibited,
626 making telnet dumb client for POP3/SMTP/NNTP/HTTP-like
627 protocols with any data including
629 IAC character (0xff).
630 After establishing a connection, the file
633 users home directory is opened.
634 Lines beginning with a # are
636 Blank lines are ignored.
638 without white space are the start of a machine entry.
640 first thing on the line is the name of the machine that is
642 It may be the hostname or numeric address specified as the argument
644 the canonical name of that string as determined by
648 indicating all hosts.
649 The rest of the line, and successive
650 lines that begin with white space are assumed to be
652 commands and are processed as if they had been typed
661 An end of file (in command mode) will also close a session and exit.
662 .It Ic send Ar arguments
663 Sends one or more special character sequences to the remote host.
664 The following are the arguments which may be specified
665 (more than one argument may be specified at a time):
666 .Bl -tag -width escape
676 (Abort Output) sequence, which should cause the remote system to flush
686 sequence, to which the remote system may or may not choose to respond.
690 (Break) sequence, which may have significance to the remote
696 sequence, which should cause the remote system to erase the last character
702 sequence, which should cause the remote system to erase the line currently
717 escape character (initially \*(Lq^\*(Rq).
722 sequence, which likely has no significance to the remote system.
724 If the remote side supports the
728 will send the subnegotiation to request that the server send
729 its current option status.
733 (Interrupt Process) sequence, which should cause the remote
734 system to abort the currently running process.
749 This sequence causes the remote system to discard all previously typed
750 (but not yet read) input.
751 This sequence is sent as
754 data (and may not work if the remote system is a
757 it doesn't work, a lower case \*(Lqr\*(Rq may be echoed on the terminal).
767 can be either a decimal number between 0 and 255,
768 or a symbolic name for a specific
776 to print out help information, including
777 a list of known symbolic names.
779 Prints out help information for the
783 .It Ic set Ar argument value
784 .It Ic unset Ar argument value
787 command will set any one of a number of
789 variables to a specific value or to
793 turns off the function associated with
794 the variable, this is equivalent to using the
799 command will disable or set to
801 any of the specified functions.
802 The values of variables may be interrogated with the
805 The variables which may be set or unset, but not toggled, are
807 In addition, any of the variables for the
809 command may be explicitly set or unset using
815 .Bl -tag -width escape
819 is in localchars mode, or
821 is enabled, and the status character is typed, a
825 preceding) is sent to the
827 The initial value for the \*(LqAre You There\*(Rq
828 character is the terminal's status character.
830 This is the value (initially \*(Lq^E\*(Rq) which, when in
831 \*(Lqline by line\*(Rq mode, toggles between doing local echoing
832 of entered characters (for normal processing), and suppressing
833 echoing of entered characters (for entering, say, a password).
839 or \*(Lqold line by line\*(Rq mode, entering this character
840 as the first character on a line will cause this character to be
841 sent to the remote system.
842 The initial value of the eof character is taken to be the terminal's
857 is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
858 character is typed, a
864 is sent to the remote system.
865 The initial value for the erase character is taken to be
872 escape character (initially \*(Lq^[\*(Rq) which causes entry
875 command mode (when connected to a remote system).
887 character is typed, a
893 is sent to the remote host.
894 The initial value for the flush character is taken to be
905 characters that, when typed, cause partial lines to be
906 forwarded to the remote system.
907 The initial value for
908 the forwarding characters are taken from the terminal's
909 eol and eol2 characters.
921 character is typed, a
927 is sent to the remote host.
928 The initial value for the interrupt character is taken to be
944 is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
945 character is typed, a
951 is sent to the remote system.
952 The initial value for the kill character is taken to be
961 or \*(Lqold line by line\*(Rq mode, then this character is taken to
965 The initial value for the lnext character is taken to be
980 character is typed, a
986 is sent to the remote host.
987 The initial value for the quit character is taken to be
996 or \*(Lqold line by line\*(Rq mode, then this character is taken to
1000 The initial value for the reprint character is taken to be
1005 This is the rlogin escape character.
1008 escape character is ignored unless it is
1009 preceded by this character at the beginning of a line.
1010 This character, at the beginning of a line followed by
1011 a "." closes the connection; when followed by a ^Z it
1015 The initial state is to
1021 .Dv TELNET TOGGLE-FLOW-CONTROL
1022 option has been enabled,
1023 then this character is taken to
1027 The initial value for the start character is taken to be
1033 .Dv TELNET TOGGLE-FLOW-CONTROL
1034 option has been enabled,
1035 then this character is taken to
1039 The initial value for the stop character is taken to be
1052 character is typed, a
1058 is sent to the remote host.
1059 The initial value for the suspend character is taken to be
1064 This is the file to which the output, caused by
1073 then tracing information will be written to standard output (the default).
1079 or \*(Lqold line by line\*(Rq mode, then this character is taken to
1083 The initial value for the worderase character is taken to be
1093 .It Ic opie Ar sequence challenge
1096 command computes a response to the OPIE challenge.
1100 command (Set Local Characters) is used to set
1101 or change the state of the special
1106 Special characters are characters that get
1109 commands sequences (like
1113 or line editing characters (like
1117 By default, the local special characters are exported.
1120 Verify the current settings for the current special characters.
1121 The remote side is requested to send all the current special
1122 character settings, and if there are any discrepancies with
1123 the local side, the local side will switch to the remote value.
1125 Switch to the local defaults for the special characters.
1127 local default characters are those of the local terminal at
1132 Switch to the remote defaults for the special characters.
1133 The remote default characters are those of the remote system
1134 at the time when the
1136 connection was established.
1138 Prints out help information for the
1143 Show the current status of
1145 This includes the peer one is connected to, as well
1146 as the current mode.
1147 .It Ic toggle Ar arguments ...
1152 various flags that control how
1155 These flags may be set explicitly to
1163 commands listed above.
1164 More than one argument may be specified.
1165 The state of these flags may be interrogated with the
1168 Valid arguments are:
1171 Turns on debugging information for the authentication code.
1183 characters are recognized (and transformed into
1189 refuses to display any data on the user's terminal
1190 until the remote system acknowledges (via a
1191 .Dv TELNET TIMING MARK
1193 that it has processed those
1196 The initial value for this toggle is
1198 if the terminal user had not
1199 done an "stty noflsh", otherwise
1206 option is negotiated, by
1207 default the actual encryption (decryption) of the data
1208 stream does not start automatically.
1210 (autodecrypt) command states that encryption of the
1211 output (input) stream should be enabled as soon as
1214 If the remote side supports the
1215 .Dv TELNET AUTHENTICATION
1218 attempts to use it to perform automatic authentication.
1221 option is not supported, the user's login
1222 name are propagated through the
1225 This command is the same as specifying
1237 then when either the
1241 characters is typed (see
1243 above for descriptions of the
1247 characters), the resulting
1249 sequence sent is followed by the
1254 cause the remote system to begin throwing away all previously
1255 typed input until both of the
1257 sequences have been read and acted upon.
1258 The initial value of this toggle is
1261 Enable or disable the
1263 option on both input and output.
1265 Enable or disable the
1269 Enable or disable the
1275 then carriage returns will be sent as
1279 then carriage returns will be send as
1281 The initial value for this toggle is
1284 Toggle carriage return mode.
1285 When this mode is enabled, most carriage return characters received from
1286 the remote host will be mapped into a carriage return followed by
1288 This mode does not affect those characters typed by the user, only
1289 those received from the remote host.
1290 This mode is not very useful unless the remote host
1291 only sends carriage return, but never line feed.
1292 The initial value for this toggle is
1295 Toggles socket level debugging (useful only to the
1297 The initial value for this toggle is
1300 Turns on debugging information for the encryption code.
1313 above) are recognized locally, and transformed into (hopefully) appropriate
1326 The initial value for this toggle is
1328 in \*(Lqold line by line\*(Rq mode,
1331 in \*(Lqcharacter at a time\*(Rq mode.
1334 option is enabled, the value of
1336 is ignored, and assumed to always be
1340 has ever been enabled, then
1356 Toggles the display of all network data (in hexadecimal format).
1357 The initial value for this toggle is
1360 Toggles the display of some internal
1362 protocol processing (having to do with
1365 The initial value for this toggle is
1370 toggle is enabled, if
1372 is enabled the output from the
1374 command will be formatted in a more user readable format.
1375 Spaces are put between each character in the output, and the
1378 escape sequence is preceded by a '*' to aid in locating them.
1380 When the skiprc toggle is
1383 skips the reading of the
1385 file in the users home
1386 directory when connections are opened.
1388 value for this toggle is
1391 Toggles the display of all terminal data (in hexadecimal format).
1392 The initial value for this toggle is
1394 .It Ic verbose_encrypt
1400 prints out a message each time encryption is enabled or
1402 The initial value for this toggle is
1412 This command only works when the user is using the
1414 .It Ic \&! Op Ar command
1415 Execute a single command in a subshell on the local
1419 is omitted, then an interactive
1420 subshell is invoked.
1421 .It Ic ?\& Op Ar command
1425 prints a help summary.
1430 will print the help information for just that command.
1440 environment variables.
1441 Other environment variables may be propagated
1442 to the other side via the
1446 .Bl -tag -width ~/.telnetrc -compact
1448 user customized telnet startup values
1462 IPv6 support was added by WIDE/KAME project.
1464 On some remote systems, echo has to be turned off manually when in
1465 \*(Lqold line by line\*(Rq mode.
1467 In \*(Lqold line by line\*(Rq mode or
1471 character is only recognized (and sent to the remote system)
1472 when it is the first character on a line.