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
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. This causes an attempt to
90 option on both input and output.
92 Stops any character from being recognized as an escape character.
94 If Kerberos V5 authentication is being used, the
96 option allows the local credentials to be forwarded
97 to the remote system, including any credentials that
98 have already been forwarded into the local environment.
100 Specifies no automatic login to the remote system.
102 Specifies an 8-bit data path on output. This causes the
104 option to be negotiated on output.
106 Prevents IP address to name lookup when destination host is given
109 Sets the IP type-of-service (TOS) option for the telnet
110 connection to the value
112 which can be a numeric TOS value
113 or, on systems that support it, a symbolic
114 TOS name found in the
120 type of authentication.
122 Attempt automatic login.
123 Currently, this sends the user name via the
128 option if supported by the remote system.
129 The name used is that of the current user as returned by
131 if it agrees with the current user ID,
132 otherwise it is the name associated with the user ID.
134 Disables the reading of the user's
138 command on this man page.)
140 Sets the initial value of the
144 .It Fl e Ar escapechar
152 there will be no escape character.
154 If Kerberos V5 authentication is being used, the
156 option allows the local credentials to be forwarded to the remote system.
158 If Kerberos authentication is being used, the
162 obtain tickets for the remote host in
165 instead of the remote host's realm, as determined by
166 .Xr krb_realmofhost 3 .
168 When connecting to the remote system, if the remote system
173 will be sent to the remote system as the value for the variable
175 This option implies the
178 This option may also be used with the
181 .It Fl n Ar tracefile
184 for recording trace information.
189 Specifies a user interface similar to
192 mode, the escape character is set to the tilde (~) character,
193 unless modified by the
197 Set the source IP address for the
201 which can be an IP address or a host name.
207 addresses only (e.g.,
209 domain sockets, accessed with a file path).
211 Turns on encryption of the data stream if possible.
213 Suppresses encryption of the data stream.
215 Indicates the official name, an alias, or the Internet address
222 establishes a connection to the corresponding named socket.
224 Indicates a port number (address of an application). If a number is
225 not specified, the default
230 When in rlogin mode, a line of the form ~. disconnects from the
231 remote host; ~ is the
234 Similarly, the line ~^Z suspends the
237 The line ~^] escapes to the normal
241 Once a connection has been opened,
243 will attempt to enable the
248 will revert to one of two input modes:
249 either \*(Lqcharacter at a time\*(Rq
250 or \*(Lqold line by line\*(Rq
251 depending on what the remote system supports.
255 is enabled, character processing is done on the
256 local system, under the control of the remote system. When input
257 editing or character echoing is to be disabled, the remote system
258 will relay that information. The remote system will also relay
259 changes to any special characters that happen on the remote
260 system, so that they can take effect on the local system.
262 In \*(Lqcharacter at a time\*(Rq mode, most
263 text typed is immediately sent to the remote host for processing.
265 In \*(Lqold line by line\*(Rq mode, all text is echoed locally,
266 and (normally) only completed lines are sent to the remote host.
267 The \*(Lqlocal echo character\*(Rq (initially \*(Lq^E\*(Rq) may be used
268 to turn off and on the local echo
269 (this would mostly be used to enter passwords
270 without the password being echoed).
274 option is enabled, or if the
278 (the default for \*(Lqold line by line\*(Rq; see below),
284 characters are trapped locally, and sent as
286 protocol sequences to the remote side.
289 has ever been enabled, then the user's
302 There are options (see
309 which cause this action to flush subsequent output to the terminal
310 (until the remote host acknowledges the
312 sequence) and flush previous terminal input
318 While connected to a remote host,
320 command mode may be entered by typing the
322 \*(Lqescape character\*(Rq (initially \*(Lq^]\*(Rq).
323 When in command mode, the normal terminal editing conventions are available.
327 commands are available.
328 Only enough of each command to uniquely identify it need be typed
329 (this is also true for arguments to the
340 .Bl -tag -width "mode type"
341 .It Ic auth Ar argument ...
342 The auth command manipulates the information sent through the
343 .Dv TELNET AUTHENTICATE
344 option. Valid arguments for the
347 .Bl -tag -width "disable type"
348 .It Ic disable Ar type
349 Disables the specified type of authentication. To
350 obtain a list of available types, use the
353 .It Ic enable Ar type
354 Enables the specified type of authentication. To
355 obtain a list of available types, use the
359 Lists the current status of the various types of
365 session and return to command mode.
366 .It Ic display Ar argument ...
367 Displays all, or some, of the
372 .It Ic encrypt Ar argument ...
373 The encrypt command manipulates the information sent through the
377 Valid arguments for the
381 .It Ic disable Ar type Xo
382 .Op Cm input | output
384 Disables the specified type of encryption. If you
385 omit the input and output, both input and output
386 are disabled. To obtain a list of available
388 .Ic encrypt disable ?\&
390 .It Ic enable Ar type Xo
391 .Op Cm input | output
393 Enables the specified type of encryption. If you
394 omit input and output, both input and output are
395 enabled. To obtain a list of available types, use the
396 .Ic encrypt enable ?\&
399 This is the same as the
400 .Ic encrypt start input
403 This is the same as the
404 .Ic encrypt stop input
407 This is the same as the
408 .Ic encrypt start output
411 This is the same as the
412 .Ic encrypt stop output
414 .It Ic start Op Cm input | output
415 Attempts to start encryption. If you omit
419 both input and output are enabled. To
420 obtain a list of available types, use the
421 .Ic encrypt enable ?\&
424 Lists the current status of encryption.
425 .It Ic stop Op Cm input | output
426 Stops encryption. If you omit input and output,
427 encryption is on both input and output.
429 Sets the default type of encryption to be used
436 .It Ic environ Ar arguments ...
439 command is used to manipulate the
440 variables that may be sent through the
443 The initial set of variables is taken from the users
444 environment, with only the
448 variables being exported by default.
451 variable is also exported if the
457 Valid arguments for the
461 .It Ic define Ar variable value
466 Any variables defined by this command are automatically exported.
469 may be enclosed in single or double quotes so
470 that tabs and spaces may be included.
471 .It Ic undefine Ar variable
474 from the list of environment variables.
475 .It Ic export Ar variable
478 to be exported to the remote side.
479 .It Ic unexport Ar variable
482 to not be exported unless
483 explicitly asked for by the remote side.
485 List the current set of environment variables.
488 will be sent automatically,
489 other variables will only be sent if explicitly requested.
491 Prints out help information for the
498 option to the remote side.
499 This command is similar to a
501 command; however, if the remote side does not support the
503 option, nothing happens.
504 If, however, the remote side does support the
506 option, this command should cause the remote side to close the
509 If the remote side also supports the concept of
510 suspending a user's session for later reattachment,
511 the logout argument indicates that you
512 should terminate the session immediately.
515 is one of several options, depending on the state of the
518 The remote host is asked for permission to go into the requested mode.
519 If the remote host is capable of entering that mode, the requested
520 mode will be entered.
525 option, or, if the remote side does not understand the
527 option, then enter \*(Lqcharacter at a time\*(Rq mode.
531 option, or, if the remote side does not understand the
533 option, then attempt to enter \*(Lqold-line-by-line\*(Rq mode.
534 .It Ic isig Pq Ic \-isig
535 Attempt to enable (disable) the
540 This requires that the
543 .It Ic edit Pq Ic \-edit
544 Attempt to enable (disable) the
549 This requires that the
552 .It Ic softtabs Pq Ic \-softtabs
553 Attempt to enable (disable) the
558 This requires that the
561 .It Ic litecho Pq Ic \-litecho
562 Attempt to enable (disable) the
567 This requires that the
571 Prints out help information for the
578 .Op Oo Fl Oc Ns Ar port
580 Open a connection to the named host.
584 will attempt to contact a
586 server at the default port.
587 The host specification may be either a host name (see
589 an Internet address specified in the \*(Lqdot notation\*(Rq (see
591 or IPv6 host name or IPv6 coloned-hexadecimal addreess.
594 option may be used to specify the user name
595 to be passed to the remote system via the
598 When connecting to a non-standard port,
600 omits any automatic initiation of
602 options. When the port number is preceded by a minus sign,
603 the initial option negotiation is done.
604 After establishing a connection, the file
607 users home directory is opened. Lines beginning with a # are
608 comment lines. Blank lines are ignored. Lines that begin
609 without white space are the start of a machine entry. The
610 first thing on the line is the name of the machine that is
611 being connected to. The rest of the line, and successive
612 lines that begin with white space are assumed to be
614 commands and are processed as if they had been typed
623 An end of file (in command mode) will also close a session and exit.
624 .It Ic send Ar arguments
625 Sends one or more special character sequences to the remote host.
626 The following are the arguments which may be specified
627 (more than one argument may be specified at a time):
629 .Bl -tag -width escape
639 (Abort Output) sequence, which should cause the remote system to flush
649 sequence, to which the remote system may or may not choose to respond.
653 (Break) sequence, which may have significance to the remote
659 sequence, which should cause the remote system to erase the last character
665 sequence, which should cause the remote system to erase the line currently
680 escape character (initially \*(Lq^\*(Rq).
685 sequence, which likely has no significance to the remote system.
687 If the remote side supports the
691 will send the subnegotiation to request that the server send
692 its current option status.
696 (Interrupt Process) sequence, which should cause the remote
697 system to abort the currently running process.
712 This sequence causes the remote system to discard all previously typed
713 (but not yet read) input.
714 This sequence is sent as
717 data (and may not work if the remote system is a
720 it doesn't work, a lower case \*(Lqr\*(Rq may be echoed on the terminal).
730 can be either a decimal number between 0 and 255,
731 or a symbolic name for a specific
739 to print out help information, including
740 a list of known symbolic names.
742 Prints out help information for the
746 .It Ic set Ar argument value
747 .It Ic unset Ar argument value
750 command will set any one of a number of
752 variables to a specific value or to
756 turns off the function associated with
757 the variable, this is equivalent to using the
762 command will disable or set to
764 any of the specified functions.
765 The values of variables may be interrogated with the
768 The variables which may be set or unset, but not toggled, are
769 listed here. In addition, any of the variables for the
771 command may be explicitly set or unset using
777 .Bl -tag -width escape
781 is in localchars mode, or
783 is enabled, and the status character is typed, a
787 preceding) is sent to the
788 remote host. The initial value for the \*(LqAre You There\*(Rq
789 character is the terminal's status character.
791 This is the value (initially \*(Lq^E\*(Rq) which, when in
792 \*(Lqline by line\*(Rq mode, toggles between doing local echoing
793 of entered characters (for normal processing), and suppressing
794 echoing of entered characters (for entering, say, a password).
800 or \*(Lqold line by line\*(Rq mode, entering this character
801 as the first character on a line will cause this character to be
802 sent to the remote system.
803 The initial value of the eof character is taken to be the terminal's
818 is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
819 character is typed, a
825 is sent to the remote system.
826 The initial value for the erase character is taken to be
833 escape character (initially \*(Lq^[\*(Rq) which causes entry
836 command mode (when connected to a remote system).
848 character is typed, a
854 is sent to the remote host.
855 The initial value for the flush character is taken to be
866 characters that, when typed, cause partial lines to be
867 forwarded to the remote system. The initial value for
868 the forwarding characters are taken from the terminal's
869 eol and eol2 characters.
881 character is typed, a
887 is sent to the remote host.
888 The initial value for the interrupt character is taken to be
904 is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
905 character is typed, a
911 is sent to the remote system.
912 The initial value for the kill character is taken to be
921 or \*(Lqold line by line\*(Rq mode, then this character is taken to
925 The initial value for the lnext character is taken to be
940 character is typed, a
946 is sent to the remote host.
947 The initial value for the quit character is taken to be
956 or \*(Lqold line by line\*(Rq mode, then this character is taken to
960 The initial value for the reprint character is taken to be
965 This is the rlogin escape character.
968 escape character is ignored unless it is
969 preceded by this character at the beginning of a line.
970 This character, at the beginning of a line followed by
971 a "." closes the connection; when followed by a ^Z it
974 command. The initial state is to
980 .Dv TELNET TOGGLE-FLOW-CONTROL
981 option has been enabled,
982 then this character is taken to
986 The initial value for the start character is taken to be
992 .Dv TELNET TOGGLE-FLOW-CONTROL
993 option has been enabled,
994 then this character is taken to
998 The initial value for the stop character is taken to be
1011 character is typed, a
1017 is sent to the remote host.
1018 The initial value for the suspend character is taken to be
1023 This is the file to which the output, caused by
1029 will be written. If it is set to
1031 then tracing information will be written to standard output (the default).
1037 or \*(Lqold line by line\*(Rq mode, then this character is taken to
1041 The initial value for the worderase character is taken to be
1051 .It Ic opie Ar sequence challenge
1054 command computes a response to the OPIE challenge.
1058 command (Set Local Characters) is used to set
1059 or change the state of the special
1063 been enabled. Special characters are characters that get
1066 commands sequences (like
1070 or line editing characters (like
1074 By default, the local special characters are exported.
1077 Verify the current settings for the current special characters.
1078 The remote side is requested to send all the current special
1079 character settings, and if there are any discrepancies with
1080 the local side, the local side will switch to the remote value.
1082 Switch to the local defaults for the special characters. The
1083 local default characters are those of the local terminal at
1088 Switch to the remote defaults for the special characters.
1089 The remote default characters are those of the remote system
1090 at the time when the
1092 connection was established.
1094 Prints out help information for the
1099 Show the current status of
1101 This includes the peer one is connected to, as well
1102 as the current mode.
1103 .It Ic toggle Ar arguments ...
1108 various flags that control how
1111 These flags may be set explicitly to
1119 commands listed above.
1120 More than one argument may be specified.
1121 The state of these flags may be interrogated with the
1124 Valid arguments are:
1127 Turns on debugging information for the authentication code.
1139 characters are recognized (and transformed into
1145 refuses to display any data on the user's terminal
1146 until the remote system acknowledges (via a
1147 .Dv TELNET TIMING MARK
1149 that it has processed those
1152 The initial value for this toggle is
1154 if the terminal user had not
1155 done an "stty noflsh", otherwise
1162 option is negotiated, by
1163 default the actual encryption (decryption) of the data
1164 stream does not start automatically. The autoencrypt
1165 (autodecrypt) command states that encryption of the
1166 output (input) stream should be enabled as soon as
1169 If the remote side supports the
1170 .Dv TELNET AUTHENTICATION
1173 attempts to use it to perform automatic authentication. If the
1175 option is not supported, the user's login
1176 name are propagated through the
1179 This command is the same as specifying
1191 then when either the
1195 characters is typed (see
1197 above for descriptions of the
1201 characters), the resulting
1203 sequence sent is followed by the
1208 cause the remote system to begin throwing away all previously
1209 typed input until both of the
1211 sequences have been read and acted upon.
1212 The initial value of this toggle is
1215 Enable or disable the
1217 option on both input and output.
1219 Enable or disable the
1223 Enable or disable the
1229 then carriage returns will be sent as
1233 then carriage returns will be send as
1235 The initial value for this toggle is
1238 Toggle carriage return mode.
1239 When this mode is enabled, most carriage return characters received from
1240 the remote host will be mapped into a carriage return followed by
1242 This mode does not affect those characters typed by the user, only
1243 those received from the remote host.
1244 This mode is not very useful unless the remote host
1245 only sends carriage return, but never line feed.
1246 The initial value for this toggle is
1249 Toggles socket level debugging (useful only to the
1251 The initial value for this toggle is
1254 Turns on debugging information for the encryption code.
1267 above) are recognized locally, and transformed into (hopefully) appropriate
1280 The initial value for this toggle is
1282 in \*(Lqold line by line\*(Rq mode,
1285 in \*(Lqcharacter at a time\*(Rq mode.
1288 option is enabled, the value of
1290 is ignored, and assumed to always be
1294 has ever been enabled, then
1310 Toggles the display of all network data (in hexadecimal format).
1311 The initial value for this toggle is
1314 Toggles the display of some internal
1316 protocol processing (having to do with
1319 The initial value for this toggle is
1324 toggle is enabled, if
1326 is enabled the output from the
1328 command will be formatted in a more user readable format.
1329 Spaces are put between each character in the output, and the
1332 escape sequence is preceded by a '*' to aid in locating them.
1334 When the skiprc toggle is
1337 skips the reading of the
1339 file in the users home
1340 directory when connections are opened. The initial
1341 value for this toggle is
1344 Toggles the display of all terminal data (in hexadecimal format).
1345 The initial value for this toggle is
1347 .It Ic verbose_encrypt
1353 prints out a message each time encryption is enabled or
1354 disabled. The initial value for this toggle is
1364 This command only works when the user is using the
1366 .It Ic \&! Op Ar command
1367 Execute a single command in a subshell on the local
1370 is omitted, then an interactive
1371 subshell is invoked.
1372 .It Ic ?\& Op Ar command
1373 Get help. With no arguments,
1375 prints a help summary.
1380 will print the help information for just that command.
1385 utility uses at least the
1391 environment variables.
1392 Other environment variables may be propagated
1393 to the other side via the
1403 .Bl -tag -width ~/.telnetrc -compact
1405 user customized telnet startup values
1413 IPv6 support was added by WIDE/KAME project.
1415 On some remote systems, echo has to be turned off manually when in
1416 \*(Lqold line by line\*(Rq mode.
1418 In \*(Lqold line by line\*(Rq mode or
1422 character is only recognized (and sent to the remote system)
1423 when it is the first character on a line.