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
49 .Op Fl e Ar escapechar
62 is used to communicate with another host using the
67 is invoked without the
69 argument, it enters command mode,
70 indicated by its prompt
72 In this mode, it accepts and executes the commands listed below.
73 If it is invoked with arguments, it performs an
75 command with those arguments.
78 .Bl -tag -width indent
82 to use IPv4 addresses only.
86 to use IPv6 addresses only.
88 Specifies an 8-bit data path.
89 This causes an attempt to
92 option on both input and output.
97 Stops any character from being recognized as an escape character.
99 If Kerberos V5 authentication is being used, the
101 option allows the local credentials to be forwarded
102 to the remote system, including any credentials that
103 have already been forwarded into the local environment.
105 Specifies no automatic login to the remote system.
107 Specifies an 8-bit data path on output.
110 option to be negotiated on output.
112 Prevents IP address to name lookup when destination host is given
115 Sets the IP type-of-service (TOS) option for the telnet
116 connection to the value
118 which can be a numeric TOS value
119 or, on systems that support it, a symbolic
120 TOS name found in the
126 type of authentication.
128 Attempt automatic login.
129 This is now the default, so this option is ignored.
130 Currently, this sends the user name via the
135 option if supported by the remote system.
136 The name used is that of the current user as returned by
138 if it agrees with the current user ID,
139 otherwise it is the name associated with the user ID.
141 Disables the reading of the user's
146 command on this man page.)
148 Sets the initial value of the
152 .It Fl e Ar escapechar
160 there will be no escape character.
162 If Kerberos V5 authentication is being used, the
164 option allows the local credentials to be forwarded to the remote system.
166 If Kerberos authentication is being used, the
170 obtain tickets for the remote host in
173 instead of the remote host's realm, as determined by
174 .Xr krb_realmofhost 3 .
176 When connecting to the remote system, if the remote system
181 will be sent to the remote system as the value for the variable
183 This option implies the
186 This option may also be used with the
189 .It Fl n Ar tracefile
192 for recording trace information.
197 Specifies a user interface similar to
200 mode, the escape character is set to the tilde (~) character,
201 unless modified by the
205 Set the source IP address for the
209 which can be an IP address or a host name.
215 addresses only (e.g.,
217 domain sockets, accessed with a file path).
219 Turns on encryption of the data stream if possible.
220 This is now the default, so this option is ignored.
222 Suppresses encryption of the data stream.
224 Indicates the official name, an alias, or the Internet address
231 establishes a connection to the corresponding named socket.
233 Indicates a port number (address of an application).
235 not specified, the default
240 When in rlogin mode, a line of the form ~.\& disconnects from the
241 remote host; ~ is the
244 Similarly, the line ~^Z suspends the
247 The line ~^] escapes to the normal
251 Once a connection has been opened,
253 will attempt to enable the
258 will revert to one of two input modes:
259 either \*(Lqcharacter at a time\*(Rq
260 or \*(Lqold line by line\*(Rq
261 depending on what the remote system supports.
265 is enabled, character processing is done on the
266 local system, under the control of the remote system.
268 editing or character echoing is to be disabled, the remote system
269 will relay that information.
270 The remote system will also relay
271 changes to any special characters that happen on the remote
272 system, so that they can take effect on the local system.
274 In \*(Lqcharacter at a time\*(Rq mode, most
275 text typed is immediately sent to the remote host for processing.
277 In \*(Lqold line by line\*(Rq mode, all text is echoed locally,
278 and (normally) only completed lines are sent to the remote host.
279 The \*(Lqlocal echo character\*(Rq (initially \*(Lq^E\*(Rq) may be used
280 to turn off and on the local echo
281 (this would mostly be used to enter passwords
282 without the password being echoed).
286 option is enabled, or if the
290 (the default for \*(Lqold line by line\*(Rq; see below),
296 characters are trapped locally, and sent as
298 protocol sequences to the remote side.
301 has ever been enabled, then the user's
314 There are options (see
321 which cause this action to flush subsequent output to the terminal
322 (until the remote host acknowledges the
324 sequence) and flush previous terminal input
330 While connected to a remote host,
332 command mode may be entered by typing the
334 \*(Lqescape character\*(Rq (initially \*(Lq^]\*(Rq).
335 When in command mode, the normal terminal editing conventions are available.
339 commands are available.
340 Only enough of each command to uniquely identify it need be typed
341 (this is also true for arguments to the
351 .Bl -tag -width "mode type"
352 .It Ic auth Ar argument ...
353 The auth command manipulates the information sent through the
354 .Dv TELNET AUTHENTICATE
356 Valid arguments for the
359 .Bl -tag -width "disable type"
360 .It Ic disable Ar type
361 Disables the specified type of authentication.
363 obtain a list of available types, use the
366 .It Ic enable Ar type
367 Enables the specified type of authentication.
369 obtain a list of available types, use the
373 Lists the current status of the various types of
379 session and return to command mode.
380 .It Ic display Ar argument ...
381 Displays all, or some, of the
386 .It Ic encrypt Ar argument ...
387 The encrypt command manipulates the information sent through the
391 Valid arguments for the
395 .It Ic disable Ar type Xo
396 .Op Cm input | output
398 Disables the specified type of encryption.
400 omit the input and output, both input and output
402 To obtain a list of available
404 .Ic encrypt disable ?\&
406 .It Ic enable Ar type Xo
407 .Op Cm input | output
409 Enables the specified type of encryption.
411 omit input and output, both input and output are
413 To obtain a list of available types, use the
414 .Ic encrypt enable ?\&
417 This is the same as the
418 .Ic encrypt start input
421 This is the same as the
422 .Ic encrypt stop input
425 This is the same as the
426 .Ic encrypt start output
429 This is the same as the
430 .Ic encrypt stop output
432 .It Ic start Op Cm input | output
433 Attempts to start encryption.
438 both input and output are enabled.
440 obtain a list of available types, use the
441 .Ic encrypt enable ?\&
444 Lists the current status of encryption.
445 .It Ic stop Op Cm input | output
447 If you omit input and output,
448 encryption is on both input and output.
450 Sets the default type of encryption to be used
457 .It Ic environ Ar arguments ...
460 command is used to manipulate the
461 variables that may be sent through the
464 The initial set of variables is taken from the users
465 environment, with only the
469 variables being exported by default.
472 variable is also exported if the
478 Valid arguments for the
482 .It Ic define Ar variable value
487 Any variables defined by this command are automatically exported.
490 may be enclosed in single or double quotes so
491 that tabs and spaces may be included.
492 .It Ic undefine Ar variable
495 from the list of environment variables.
496 .It Ic export Ar variable
499 to be exported to the remote side.
500 .It Ic unexport Ar variable
503 to not be exported unless
504 explicitly asked for by the remote side.
506 List the current set of environment variables.
509 will be sent automatically,
510 other variables will only be sent if explicitly requested.
512 Prints out help information for the
519 option to the remote side.
520 This command is similar to a
522 command; however, if the remote side does not support the
524 option, nothing happens.
525 If, however, the remote side does support the
527 option, this command should cause the remote side to close the
530 If the remote side also supports the concept of
531 suspending a user's session for later reattachment,
532 the logout argument indicates that you
533 should terminate the session immediately.
536 is one of several options, depending on the state of the
539 The remote host is asked for permission to go into the requested mode.
540 If the remote host is capable of entering that mode, the requested
541 mode will be entered.
546 option, or, if the remote side does not understand the
548 option, then enter \*(Lqcharacter at a time\*(Rq mode.
552 option, or, if the remote side does not understand the
554 option, then attempt to enter \*(Lqold-line-by-line\*(Rq mode.
555 .It Ic isig Pq Ic \-isig
556 Attempt to enable (disable) the
561 This requires that the
564 .It Ic edit Pq Ic \-edit
565 Attempt to enable (disable) the
570 This requires that the
573 .It Ic softtabs Pq Ic \-softtabs
574 Attempt to enable (disable) the
579 This requires that the
582 .It Ic litecho Pq Ic \-litecho
583 Attempt to enable (disable) the
588 This requires that the
592 Prints out help information for the
600 .Op Oo Fl /+ Oc Ns Ar port
602 Open a connection to the named host.
606 will attempt to contact a
608 server at the default port.
609 The host specification may be either a host name (see
611 an Internet address specified in the \*(Lqdot notation\*(Rq (see
613 or IPv6 host name or IPv6 coloned-hexadecimal addreess.
616 option may be used to specify the user name
617 to be passed to the remote system via the
620 When connecting to a non-standard port,
622 omits any automatic initiation of
625 When the port number is preceded by a minus sign,
626 the initial option negotiation is done.
627 When, however, the port number
628 is preceded by a plus sign,
629 any option negotiation and understanding is prohibited,
630 making telnet dumb client for POP3/SMTP/NNTP/HTTP-like
631 protocols with any data including
633 IAC character (0xff).
634 After establishing a connection, the file
637 users home directory is opened.
638 Lines beginning with a # are
640 Blank lines are ignored.
642 without white space are the start of a machine entry.
644 first thing on the line is the name of the machine that is
646 It may be the hostname or numeric address specified as the argument
648 the canonical name of that string as determined by
652 indicating all hosts.
653 The rest of the line, and successive
654 lines that begin with white space are assumed to be
656 commands and are processed as if they had been typed
665 An end of file (in command mode) will also close a session and exit.
666 .It Ic send Ar arguments
667 Sends one or more special character sequences to the remote host.
668 The following are the arguments which may be specified
669 (more than one argument may be specified at a time):
670 .Bl -tag -width escape
680 (Abort Output) sequence, which should cause the remote system to flush
690 sequence, to which the remote system may or may not choose to respond.
694 (Break) sequence, which may have significance to the remote
700 sequence, which should cause the remote system to erase the last character
706 sequence, which should cause the remote system to erase the line currently
721 escape character (initially \*(Lq^\*(Rq).
726 sequence, which likely has no significance to the remote system.
728 If the remote side supports the
732 will send the subnegotiation to request that the server send
733 its current option status.
737 (Interrupt Process) sequence, which should cause the remote
738 system to abort the currently running process.
753 This sequence causes the remote system to discard all previously typed
754 (but not yet read) input.
755 This sequence is sent as
758 data (and may not work if the remote system is a
761 it doesn't work, a lower case \*(Lqr\*(Rq may be echoed on the terminal).
771 can be either a decimal number between 0 and 255,
772 or a symbolic name for a specific
780 to print out help information, including
781 a list of known symbolic names.
783 Prints out help information for the
787 .It Ic set Ar argument value
788 .It Ic unset Ar argument value
791 command will set any one of a number of
793 variables to a specific value or to
797 turns off the function associated with
798 the variable, this is equivalent to using the
803 command will disable or set to
805 any of the specified functions.
806 The values of variables may be interrogated with the
809 The variables which may be set or unset, but not toggled, are
811 In addition, any of the variables for the
813 command may be explicitly set or unset using
819 .Bl -tag -width escape
823 is in localchars mode, or
825 is enabled, and the status character is typed, a
829 preceding) is sent to the
831 The initial value for the \*(LqAre You There\*(Rq
832 character is the terminal's status character.
834 This is the value (initially \*(Lq^E\*(Rq) which, when in
835 \*(Lqline by line\*(Rq mode, toggles between doing local echoing
836 of entered characters (for normal processing), and suppressing
837 echoing of entered characters (for entering, say, a password).
843 or \*(Lqold line by line\*(Rq mode, entering this character
844 as the first character on a line will cause this character to be
845 sent to the remote system.
846 The initial value of the eof character is taken to be the terminal's
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 erase character is taken to be
876 escape character (initially \*(Lq^[\*(Rq) which causes entry
879 command mode (when connected to a remote system).
891 character is typed, a
897 is sent to the remote host.
898 The initial value for the flush character is taken to be
909 characters that, when typed, cause partial lines to be
910 forwarded to the remote system.
911 The initial value for
912 the forwarding characters are taken from the terminal's
913 eol and eol2 characters.
925 character is typed, a
931 is sent to the remote host.
932 The initial value for the interrupt character is taken to be
948 is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
949 character is typed, a
955 is sent to the remote system.
956 The initial value for the kill character is taken to be
965 or \*(Lqold line by line\*(Rq mode, then this character is taken to
969 The initial value for the lnext character is taken to be
984 character is typed, a
990 is sent to the remote host.
991 The initial value for the quit character is taken to be
1000 or \*(Lqold line by line\*(Rq mode, then this character is taken to
1004 The initial value for the reprint character is taken to be
1009 This is the rlogin escape character.
1012 escape character is ignored unless it is
1013 preceded by this character at the beginning of a line.
1014 This character, at the beginning of a line followed by
1015 a "." closes the connection; when followed by a ^Z it
1019 The initial state is to
1025 .Dv TELNET TOGGLE-FLOW-CONTROL
1026 option has been enabled,
1027 then this character is taken to
1031 The initial value for the start character is taken to be
1037 .Dv TELNET TOGGLE-FLOW-CONTROL
1038 option has been enabled,
1039 then this character is taken to
1043 The initial value for the stop character is taken to be
1056 character is typed, a
1062 is sent to the remote host.
1063 The initial value for the suspend character is taken to be
1068 This is the file to which the output, caused by
1077 then tracing information will be written to standard output (the default).
1083 or \*(Lqold line by line\*(Rq mode, then this character is taken to
1087 The initial value for the worderase character is taken to be
1097 .It Ic opie Ar sequence challenge
1100 command computes a response to the OPIE challenge.
1104 command (Set Local Characters) is used to set
1105 or change the state of the special
1110 Special characters are characters that get
1113 commands sequences (like
1117 or line editing characters (like
1121 By default, the local special characters are exported.
1124 Verify the current settings for the current special characters.
1125 The remote side is requested to send all the current special
1126 character settings, and if there are any discrepancies with
1127 the local side, the local side will switch to the remote value.
1129 Switch to the local defaults for the special characters.
1131 local default characters are those of the local terminal at
1136 Switch to the remote defaults for the special characters.
1137 The remote default characters are those of the remote system
1138 at the time when the
1140 connection was established.
1142 Prints out help information for the
1147 Show the current status of
1149 This includes the peer one is connected to, as well
1150 as the current mode.
1151 .It Ic toggle Ar arguments ...
1156 various flags that control how
1159 These flags may be set explicitly to
1167 commands listed above.
1168 More than one argument may be specified.
1169 The state of these flags may be interrogated with the
1172 Valid arguments are:
1175 Turns on debugging information for the authentication code.
1187 characters are recognized (and transformed into
1193 refuses to display any data on the user's terminal
1194 until the remote system acknowledges (via a
1195 .Dv TELNET TIMING MARK
1197 that it has processed those
1200 The initial value for this toggle is
1202 if the terminal user had not
1203 done an "stty noflsh", otherwise
1210 option is negotiated, by
1211 default the actual encryption (decryption) of the data
1212 stream does not start automatically.
1214 (autodecrypt) command states that encryption of the
1215 output (input) stream should be enabled as soon as
1218 If the remote side supports the
1219 .Dv TELNET AUTHENTICATION
1222 attempts to use it to perform automatic authentication.
1225 option is not supported, the user's login
1226 name are propagated through the
1229 This command is the same as specifying
1241 then when either the
1245 characters is typed (see
1247 above for descriptions of the
1251 characters), the resulting
1253 sequence sent is followed by the
1258 cause the remote system to begin throwing away all previously
1259 typed input until both of the
1261 sequences have been read and acted upon.
1262 The initial value of this toggle is
1265 Enable or disable the
1267 option on both input and output.
1269 Enable or disable the
1273 Enable or disable the
1279 then carriage returns will be sent as
1283 then carriage returns will be send as
1285 The initial value for this toggle is
1288 Toggle carriage return mode.
1289 When this mode is enabled, most carriage return characters received from
1290 the remote host will be mapped into a carriage return followed by
1292 This mode does not affect those characters typed by the user, only
1293 those received from the remote host.
1294 This mode is not very useful unless the remote host
1295 only sends carriage return, but never line feed.
1296 The initial value for this toggle is
1299 Toggles socket level debugging (useful only to the
1301 The initial value for this toggle is
1304 Turns on debugging information for the encryption code.
1317 above) are recognized locally, and transformed into (hopefully) appropriate
1330 The initial value for this toggle is
1332 in \*(Lqold line by line\*(Rq mode,
1335 in \*(Lqcharacter at a time\*(Rq mode.
1338 option is enabled, the value of
1340 is ignored, and assumed to always be
1344 has ever been enabled, then
1360 Toggles the display of all network data (in hexadecimal format).
1361 The initial value for this toggle is
1364 Toggles the display of some internal
1366 protocol processing (having to do with
1369 The initial value for this toggle is
1374 toggle is enabled, if
1376 is enabled the output from the
1378 command will be formatted in a more user readable format.
1379 Spaces are put between each character in the output, and the
1382 escape sequence is preceded by a '*' to aid in locating them.
1384 When the skiprc toggle is
1387 skips the reading of the
1389 file in the users home
1390 directory when connections are opened.
1392 value for this toggle is
1395 Toggles the display of all terminal data (in hexadecimal format).
1396 The initial value for this toggle is
1398 .It Ic verbose_encrypt
1404 prints out a message each time encryption is enabled or
1406 The initial value for this toggle is
1416 This command only works when the user is using the
1418 .It Ic \&! Op Ar command
1419 Execute a single command in a subshell on the local
1423 is omitted, then an interactive
1424 subshell is invoked.
1425 .It Ic ?\& Op Ar command
1429 prints a help summary.
1434 will print the help information for just that command.
1444 environment variables.
1445 Other environment variables may be propagated
1446 to the other side via the
1450 .Bl -tag -width ~/.telnetrc -compact
1452 user customized telnet startup values
1466 IPv6 support was added by WIDE/KAME project.
1468 On some remote systems, echo has to be turned off manually when in
1469 \*(Lqold line by line\*(Rq mode.
1471 In \*(Lqold line by line\*(Rq mode or
1475 character is only recognized (and sent to the remote system)
1476 when it is the first character on a line.