1502 Remove conversion cruft from manpages
[unleashed.git] / usr / src / man / man1 / telnet.1
blob22e1ed2ee2a6cf334b43d6b8fb6d711ad266af66
1 '\" te
2 .\" Copyright 1989 AT&T
3 .\" Copyright (C) 2004, Sun Microsystems, Inc. All Rights Reserved
4 .\" Copyright (c) 1983, 1990, 1993 The Regents of the University of California. All rights reserved.
5 .TH TELNET 1 "Aug 17, 2006"
6 .SH NAME
7 telnet \- user interface to a remote system using the TELNET protocol
8 .SH SYNOPSIS
9 .LP
10 .nf
11 \fBtelnet\fR [\fB-8EFKLacdfrx\fR] [\fB-X\fR \fIatype\fR] [\fB-e\fR \fIescape_char\fR]
12      [\fB-k\fR \fIrealm\fR] [\fB-l\fR \fIuser\fR] [\fB-n\fR \fIfile\fR]
13      [ [ [!] @hop1 [@hop2...] @] \fIhost\fR [\fIport\fR]]
14 .fi
16 .SH DESCRIPTION
17 .sp
18 .LP
19 The \fBtelnet\fR utility communicates with another host using the \fBTELNET\fR
20 protocol. If \fBtelnet\fR is invoked without arguments, it enters command mode,
21 indicated by its prompt, \fBtelnet>\fR. In this mode, it accepts and executes
22 its associated commands. See \fBUSAGE\fR. If it is invoked with arguments, it
23 performs an \fBopen\fR command with those arguments.
24 .sp
25 .LP
26 If, for example, a \fIhost\fR is specified as \fI@hop1@hop2@host\fR, the
27 connection goes through hosts \fIhop1\fR and \fIhop2\fR, using loose source
28 routing to end at \fIhost\fR. If a leading \fB!\fR is used, the connection
29 follows strict source routing. Notice that when \fBtelnet\fR uses IPv6, it can
30 only use loose source routing, and the connection ignores the \fB!\fR.
31 .sp
32 .LP
33 Once a connection has been opened, \fBtelnet\fR enters input mode. In this
34 mode, text typed is sent to the remote host. The input mode entered will be
35 either "line mode", "character at a time", or "old line by line", depending
36 upon what the remote system supports.
37 .sp
38 .LP
39 In "line mode", character processing is done on the local system, under the
40 control of the remote system. When input editing or character echoing is to be
41 disabled, the remote system will relay that information. The remote system will
42 also relay changes to any special characters that happen on the remote system,
43 so that they can take effect on the local system.
44 .sp
45 .LP
46 In "character at a time" mode, most text typed is immediately sent to the
47 remote host for processing.
48 .sp
49 .LP
50 In "old line by line" mode, all text is echoed locally, and (normally) only
51 completed lines are sent to the remote host. The "local echo character"
52 (initially \fB^E\fR) may be used to turn off and on the local echo. (Use this
53 mostly to enter passwords without the password being echoed.).
54 .sp
55 .LP
56 If the "line mode" option is enabled, or if the \fBlocalchars\fR toggle is
57 \fBTRUE\fR (the default in "old line by line" mode), the user's \fBquit\fR,
58 \fBintr\fR, and \fBflush\fR characters are trapped locally, and sent as
59 \fBTELNET\fR protocol sequences to the remote side. If "line mode" has ever
60 been enabled, then the user's \fBsusp\fR and \fBeof\fR are also sent as
61 \fBTELNET\fR protocol sequences. \fBquit\fR is then sent as a \fBTELNET
62 ABORT\fR instead of \fBBREAK\fR. The options \fBtoggle\fR \fBautoflush\fR and
63 \fBtoggle\fR \fBautosynch\fR cause this action to flush subsequent output to
64 the terminal (until the remote host acknowledges the \fBTELNET\fR sequence);
65 and to flush previous terminal input, in the case of \fBquit\fR and \fBintr\fR.
66 .sp
67 .LP
68 While connected to a remote host, the user can enter \fBtelnet\fR command mode
69 by typing the \fBtelnet\fR escape character (initially \fB^]\fR). When in
70 command mode, the normal terminal editing conventions are available. Pressing
71 RETURN at the \fBtelnet\fR command prompt causes \fBtelnet\fR to exit command
72 mode.
73 .SH OPTIONS
74 .sp
75 .LP
76 The following options are supported:
77 .sp
78 .ne 2
79 .na
80 \fB\fB-8\fR\fR
81 .ad
82 .sp .6
83 .RS 4n
84 Specifies an 8-bit data path. Negotiating the \fBTELNET BINARY\fR option is
85 attempted for both input and output.
86 .RE
88 .sp
89 .ne 2
90 .na
91 \fB\fB-a\fR\fR
92 .ad
93 .sp .6
94 .RS 4n
95 Attempts automatic login. This sends the user name by means of the \fBUSER\fR
96 variable of the \fBENVIRON\fR option, if supported by the remote system. The
97 name used is that of the current user as returned by \fBgetlogin\fR(3C) if it
98 agrees with the current user \fBID\fR. Otherwise, it is the name associated
99 with the user \fBID\fR.
103 .ne 2
105 \fB\fB-c\fR\fR
107 .sp .6
108 .RS 4n
109 Disables the reading of the user's \fBtelnetrc\fR file. (See the \fBtoggle\fR
110 \fBskiprc\fR command on this reference page.)
114 .ne 2
116 \fB\fB-d\fR\fR
118 .sp .6
119 .RS 4n
120 Sets the initial value of the \fBdebug\fR toggle to \fBTRUE\fR.
124 .ne 2
126 \fB\fB-e\fR \fIescape_char\fR\fR
128 .sp .6
129 .RS 4n
130 Sets the initial escape character to \fIescape_char\fR. \fIescape_char\fR may
131 also be a two character sequence consisting of \fB^\fR (Control key) followed
132 by one character. If the second character is \fB?\fR, the \fBDEL\fR character
133 is selected. Otherwise, the second character is converted to a control
134 character and used as the escape character. If \fIescape_char\fR is defined as
135 the null string (that is, \fB-e\fR \fB\&''\fR), this is equivalent to
136 \fB-e\fR '\fB^@\fR' (Control-@). To specify that no character can be the escape
137 character, use the \fB-E\fR option.
141 .ne 2
143 \fB\fB-E\fR\fR
145 .sp .6
146 .RS 4n
147 Stops any character from being recognized as an escape character.
151 .ne 2
153 \fB\fB-f\fR\fR
155 .sp .6
156 .RS 4n
157 Forwards a copy of the local credentials to the remote system.
161 .ne 2
163 \fB\fB-F\fR\fR
165 .sp .6
166 .RS 4n
167 Forwards a forwardable copy of the local credentials to the remote system.
171 .ne 2
173 \fB\fB-k\fR \fIrealm\fR\fR
175 .sp .6
176 .RS 4n
177 If Kerberos authentication is being used, requests that \fBtelnet\fR obtain
178 tickets for the remote host in \fIrealm\fR instead of the remote host's default
179 realm as determined in\fBkrb5.conf\fR(4).
183 .ne 2
185 \fB\fB-K\fR\fR
187 .sp .6
188 .RS 4n
189 Specifies no automatic login to the remote system.
193 .ne 2
195 \fB\fB-l\fR \fIuser\fR\fR
197 .sp .6
198 .RS 4n
199 When connecting to a remote system that understands the \fBENVIRON\fR option,
200 then \fIuser\fR will be sent to the remote system as the value for the
201 \fBENVIRON\fR variable \fBUSER\fR.
205 .ne 2
207 \fB\fB-L\fR\fR
209 .sp .6
210 .RS 4n
211 Specifies an 8-bit data path on output. This causes the \fBBINARY\fR option to
212 be negotiated on output.
216 .ne 2
218 \fB\fB-n\fR \fItracefile\fR\fR
220 .sp .6
221 .RS 4n
222 Opens \fItracefile\fR for recording trace information. See the \fBset\fR
223 \fItracefile\fR command below.
227 .ne 2
229 \fB\fB-r\fR\fR
231 .sp .6
232 .RS 4n
233 Specifies a user interface similar to \fBrlogin\fR. In this mode, the escape
234 character is set to the tilde (\fB~\fR) character, unless modified by the
235 \fB-e\fR option. The \fBrlogin\fR escape character is only recognized when it
236 is preceded by a carriage return. In this mode, the \fBtelnet\fR escape
237 character, normally '\fB^]\fR', must still precede a \fBtelnet\fR command. The
238 \fBrlogin\fR escape character can also be followed by '\fB\&.\er\fR'
239 or '\fB^Z\fR', and, like \fBrlogin\fR(1), closes or suspends the connection,
240 respectively. This option is an uncommitted interface and may change in the
241 future.
245 .ne 2
247 \fB\fB-x\fR\fR
249 .sp .6
250 .RS 4n
251 Turns on encryption of the data stream. When this option is turned on,
252 \fBtelnet\fR will exit with an error if authentication cannot be negotiated or
253 if encryption cannot be turned on.
257 .ne 2
259 \fB\fB-X\fR \fIatype\fR\fR
261 .sp .6
262 .RS 4n
263 Disables the \fIatype\fR type of authentication.
266 .SH USAGE
267 .SS "telnet Commands"
270 The commands described in this section are available with \fBtelnet\fR. It is
271 necessary to type only enough of each command to uniquely identify it. (This is
272 also true for arguments to the \fBmode\fR, \fBset\fR, \fBtoggle\fR,
273 \fBunset\fR, \fBenviron\fR, and \fBdisplay\fR commands.)
275 .ne 2
277 \fB\fBauth\fR \fIargument\fR ...\fR
279 .sp .6
280 .RS 4n
281 The \fBauth\fR command manipulates the information sent through the
282 \fBTELNET\fR \fBAUTHENTICATE\fR option. Valid arguments for the \fBauth\fR
283 command are as follows:
285 .ne 2
287 \fB\fBdisable\fR \fItype\fR\fR
289 .sp .6
290 .RS 4n
291 Disables the specified type of authentication. To obtain a list of available
292 types, use the \fBauth\fR \fBdisable ?\fR command.
296 .ne 2
298 \fB\fBenable\fR \fItype\fR\fR
300 .sp .6
301 .RS 4n
302 Enables the specified type of authentication. To obtain a list of available
303 types, use the \fBauth\fR \fBenable ?\fR command.
307 .ne 2
309 \fB\fBstatus\fR\fR
311 .sp .6
312 .RS 4n
313 Lists the current status of the various types of authentication.
319 .ne 2
321 \fB\fBopen\fR [\fB\fR\fB-l\fR \fIuser\fR ] [ [!] @\fIhop1\fR
322 [@\fIhop2\fR ...]@\fIhost\fR [ \fIport\fR ]\fR
324 .sp .6
325 .RS 4n
326 Open a connection to the named host. If no port number is specified,
327 \fBtelnet\fR will attempt to contact a \fBTELNET\fR server at the default port.
328 The host specification may be either a host name (see \fBhosts\fR(4)) or an
329 Internet address specified in the "dot notation" (see \fBinet\fR(7P) or
330 \fBinet6\fR(7P)). If the \fIhost\fR is specified as \fI@hop1@hop2@host\fR, the
331 connection goes through hosts \fIhop1\fR and \fIhop2\fR, using loose source
332 routing to end at \fIhost\fR. The \fB@\fR symbol is required as a separator
333 between the hosts specified. If a leading \fB!\fR is used with IPv4, the
334 connection follows strict source routing.
336 The \fB-l\fR option passes the \fIuser\fR as the value of the \fBENVIRON\fR
337 variable \fBUSER\fR to the remote system.
341 .ne 2
343 \fB\fBclose\fR\fR
345 .sp .6
346 .RS 4n
347 Close any open \fBTELNET\fR session and exit \fBtelnet\fR. An \fBEOF\fR (in
348 command mode) will also close a session and exit.
352 .ne 2
354 \fB\fBencrypt\fR\fR
356 .sp .6
357 .RS 4n
358 The encrypt command manipulates the information sent through the \fBTELNET\fR
359 \fBENCRYPT\fR option.
361 Valid arguments for the encrypt command are as follows:
363 .ne 2
365 \fB\fBdisable\fR \fItype\fR [\fBinput\fR|\fBoutput\fR]\fR
367 .sp .6
368 .RS 4n
369 Disables the specified type of encryption. If you omit the input and output,
370 both input and output are disabled. To obtain a list of available types, use
371 the \fBencrypt\fR \fBdisable ?\fR command.
375 .ne 2
377 \fB\fBenable\fR \fItype\fR [\fBinput\fR|\fBoutput\fR]\fR
379 .sp .6
380 .RS 4n
381 Enables the specified type of encryption. If you omit input and output, both
382 input and output are enabled. To obtain a list of available types, use the
383 \fBencrypt\fR \fBenable ?\fR command.
387 .ne 2
389 \fB\fBinput\fR\fR
391 .sp .6
392 .RS 4n
393 This is the same as the \fBencrypt\fR \fBstart input\fR command.
397 .ne 2
399 \fB\fB-input\fR\fR
401 .sp .6
402 .RS 4n
403 This is the same as the \fBencrypt\fR \fBstop input\fR command.
407 .ne 2
409 \fB\fBoutput\fR\fR
411 .sp .6
412 .RS 4n
413 This is the same as the \fBencrypt\fR \fBstart output\fR command.
417 .ne 2
419 \fB\fB-output\fR\fR
421 .sp .6
422 .RS 4n
423 This is the same as the \fBencrypt\fR \fBstop output\fR command.
427 .ne 2
429 \fB\fBstart\fR [\fBinput\fR|\fBoutput\fR]\fR
431 .sp .6
432 .RS 4n
433 Attempts to start encryption. If you omit input and output, both input and
434 output are enabled. To obtain a list of available types, use the \fBencrypt\fR
435 \fBenable ?\fR command.
439 .ne 2
441 \fB\fBstatus\fR\fR
443 .sp .6
444 .RS 4n
445 Lists the current status of encryption.
449 .ne 2
451 \fB\fBstop\fR [\fBinput\fR|\fBoutput\fR]\fR
453 .sp .6
454 .RS 4n
455 Stops encryption. If you omit input and output, encryption is on both input and
456 output.
460 .ne 2
462 \fB\fBtype\fR \fItype\fR\fR
464 .sp .6
465 .RS 4n
466 Sets the default type of encryption to be used with later \fBencrypt\fR
467 \fBstart\fR or \fBencrypt\fR \fBstop\fR commands.
473 .ne 2
475 \fB\fBquit\fR\fR
477 .sp .6
478 .RS 4n
479 Same as \fBclose\fR.
483 .ne 2
485 \fB\fBz\fR\fR
487 .sp .6
488 .RS 4n
489 Suspend \fBtelnet\fR. This command only works when the user is using a shell
490 that supports job control, such as \fBsh\fR(1).
494 .ne 2
496 \fB\fBmode\fR \fItype\fR\fR
498 .sp .6
499 .RS 4n
500 The remote host is asked for permission to go into the requested mode. If the
501 remote host is capable of entering that mode, the requested mode will be
502 entered. The argument \fItype\fR is one of the following:
504 .ne 2
506 \fB\fBcharacter\fR\fR
508 .sp .6
509 .RS 4n
510 Disable the \fBTELNET LINEMODE\fR option, or, if the remote side does not
511 understand the \fBLINEMODE\fR option, then enter "character at a time" mode.
515 .ne 2
517 \fB\fBline\fR\fR
519 .sp .6
520 .RS 4n
521 Enable the \fBTELNET LINEMODE\fR option, or, if the remote side does not
522 understand the \fBLINEMODE\fR option, then attempt to enter "old-line-by-line"
523 mode.
527 .ne 2
529 \fB\fBisig\fR (\fB-isig\fR)\fR
531 .sp .6
532 .RS 4n
533 Attempt to enable (disable) the \fBTRAPSIG\fR mode of the \fBLINEMODE\fR
534 option. This requires that the \fBLINEMODE\fR option be enabled.
538 .ne 2
540 \fB\fBedit\fR (\fB-edit\fR)\fR
542 .sp .6
543 .RS 4n
544 Attempt to enable (disable) the \fBEDIT\fR mode of the \fBLINEMODE\fR option.
545 This requires that the \fBLINEMODE\fR option be enabled.
549 .ne 2
551 \fB\fBsofttabs\fR (\fB-softtabs\fR)\fR
553 .sp .6
554 .RS 4n
555 Attempt to enable (disable) the \fBSOFT_TAB\fR mode of the \fBLINEMODE\fR
556 option. This requires that the \fBLINEMODE\fR option be enabled.
560 .ne 2
562 \fB\fBlitecho\fR (\fB-litecho\fR)\fR
564 .sp .6
565 .RS 4n
566 Attempt to enable (disable) the \fBLIT_ECHO\fR mode of the \fBLINEMODE\fR
567 option. This requires that the \fBLINEMODE\fR option be enabled.
571 .ne 2
573 \fB\fB?\fR\fR
575 .sp .6
576 .RS 4n
577 Prints out help information for the \fBmode\fR command.
583 .ne 2
585 \fB\fBstatus\fR\fR
587 .sp .6
588 .RS 4n
589 Show the current status of \fBtelnet\fR. This includes the peer one is
590 connected to, as well as the current mode.
594 .ne 2
596 \fB\fBdisplay\fR\fR
598 .sp .6
599 .RS 4n
600 [\fIargument\fR\|.\|.\|.\|] Display all, or some, of the \fBset\fR and
601 \fBtoggle\fR values (see \fBtoggle\fR \fIargument\fR.\|.\|.).
605 .ne 2
607 \fB\fB?\fR\fR
609 .sp .6
610 .RS 4n
611 [\fIcommand\fR] Get help. With no arguments, \fBtelnet\fR prints a help
612 summary. If a command is specified, \fBtelnet\fR will print the help
613 information for just that command.
617 .ne 2
619 \fB\fBsend\fR \fIargument\fR\fB\|.\|.\|.\fR\fR
621 .sp .6
622 .RS 4n
623 Send one or more special character sequences to the remote host. The following
624 are the arguments that can be specified (more than one argument may be
625 specified at a time):
627 .ne 2
629 \fB\fBescape\fR\fR
631 .sp .6
632 .RS 4n
633 Send the current \fBtelnet\fR escape character (initially \fB^]\fR).
637 .ne 2
639 \fB\fBsynch\fR\fR
641 .sp .6
642 .RS 4n
643 Send the \fBTELNET SYNCH\fR sequence. This sequence discards all previously
644 typed, but not yet read, input on the remote system. This sequence is sent as
645 \fBTCP\fR urgent data and may not work if the remote system is a 4.2 \fBBSD\fR
646 system. If it does not work, a lowercase "r" may be echoed on the terminal.
650 .ne 2
652 \fB\fBbrk\fR or \fBbreak\fR\fR
654 .sp .6
655 .RS 4n
656 Send the \fBTELNET BRK\fR (Break) sequence, which may have significance to the
657 remote system.
661 .ne 2
663 \fB\fBip\fR\fR
665 .sp .6
666 .RS 4n
667 Send the \fBTELNET IP\fR (Interrupt Process) sequence, which aborts the
668 currently running process on the remote system.
672 .ne 2
674 \fB\fBabort\fR\fR
676 .sp .6
677 .RS 4n
678 Send the \fBTELNET ABORT\fR (Abort Process) sequence.
682 .ne 2
684 \fB\fBao\fR\fR
686 .sp .6
687 .RS 4n
688 Send the \fBTELNET AO\fR (Abort Output) sequence, which flushes all output from
689 the remote system to the user's terminal.
693 .ne 2
695 \fB\fBayt\fR\fR
697 .sp .6
698 .RS 4n
699 Send the \fBTELNET AYT\fR (Are You There) sequence, to which the remote system
700 may or may not respond.
704 .ne 2
706 \fB\fBec\fR\fR
708 .sp .6
709 .RS 4n
710 Send the \fBTELNET EC\fR (Erase Character) sequence, which erases the last
711 character entered.
715 .ne 2
717 \fB\fBel\fR\fR
719 .sp .6
720 .RS 4n
721 Send the \fBTELNET EL\fR (Erase Line) sequence, which should cause the remote
722 system to erase the line currently being entered.
726 .ne 2
728 \fB\fBeof\fR\fR
730 .sp .6
731 .RS 4n
732 Send the \fBTELNET EOF\fR (End Of File) sequence.
736 .ne 2
738 \fB\fBeor\fR\fR
740 .sp .6
741 .RS 4n
742 Send the \fBTELNET EOR\fR (End Of Record) sequence.
746 .ne 2
748 \fB\fBga\fR\fR
750 .sp .6
751 .RS 4n
752 Send the \fBTELNET GA\fR (Go Ahead) sequence, which probably has no
753 significance for the remote system.
757 .ne 2
759 \fB\fBgetstatus\fR\fR
761 .sp .6
762 .RS 4n
763 If the remote side supports the \fBTELNET STATUS\fR command, \fBgetstatus\fR
764 will send the subnegotiation to request that the server send its current option
765 status.
769 .ne 2
771 \fB\fBnop\fR\fR
773 .sp .6
774 .RS 4n
775 Send the \fBTELNET NOP\fR (No Operation) sequence.
779 .ne 2
781 \fB\fBsusp\fR\fR
783 .sp .6
784 .RS 4n
785 Send the \fBTELNET SUSP\fR (Suspend Process) sequence.
789 .ne 2
791 \fB\fBdo\fR \fIoption\fR\fR
795 \fB\fBdont\fR \fIoption\fR\fR
799 \fB\fBwill\fR \fIoption\fR\fR
803 \fB\fBwont\fR \fIoption\fR\fR
805 .sp .6
806 .RS 4n
807 Send the \fBTELNET\fR protocol option negotiation indicated. Option may be the
808 text name of the protocol option, or the number corresponding to the option.
809 The command will be silently ignored if the option negotiation indicated is not
810 valid in the current state. If the \fIoption\fR is given as \fBhelp\fR or
811 \fB?\fR, the list of option names known is listed. This command is mostly
812 useful for unusual debugging situations.
816 .ne 2
818 \fB\fB?\fR\fR
820 .sp .6
821 .RS 4n
822 Print out help information for the \fBsend\fR command.
828 .ne 2
830 \fB\fBset\fR \fIargument\fR [\fIvalue\fR]\fR
834 \fB\fBunset\fR \fIargument\fR\fR
836 .sp .6
837 .RS 4n
838 Set any one of a number of \fBtelnet\fR variables to a specific value. The
839 special value \fBoff\fR turns off the function associated with the variable.
840 The values of variables may be interrogated with the \fBdisplay\fR command. If
841 \fIvalue\fR is omitted, the value is taken to be true, or "on". If the
842 \fBunset\fR form is used, the value is taken to be false, or \fBoff\fR. The
843 variables that may be specified are:
845 .ne 2
847 \fB\fBecho\fR\fR
849 .sp .6
850 .RS 4n
851 This is the value (initially \fB^E\fR) that, when in "line by line" mode,
852 toggles between local echoing of entered characters for normal processing, and
853 suppressing echoing of entered characters, for example, entering a password.
857 .ne 2
859 \fB\fBescape\fR\fR
861 .sp .6
862 .RS 4n
863 This is the \fBtelnet\fR escape character (initially \fB^]\fR) that enters
864 \fBtelnet\fR command mode when connected to a remote system.
868 .ne 2
870 \fB\fBinterrupt\fR\fR
872 .sp .6
873 .RS 4n
874 If \fBtelnet\fR is in \fBlocalchars\fR mode (see \fBtoggle\fR,
875 \fBlocalchars\fR) and the \fBinterrupt\fR character is typed, a \fBTELNET IP\fR
876 sequence (see \fBsend\fR and \fBip\fR) is sent to the remote host. The initial
877 value for the interrupt character is taken to be the terminal's \fBintr\fR
878 character.
882 .ne 2
884 \fB\fBquit\fR\fR
886 .sp .6
887 .RS 4n
888 If \fBtelnet\fR is in \fBlocalchars\fR mode and the \fBquit\fR character is
889 typed, a \fBTELNET BRK\fR sequence (see \fBsend\fR, \fBbrk\fR) is sent to the
890 remote host. The initial value for the quit character is taken to be the
891 terminal's \fBquit\fR character.
895 .ne 2
897 \fB\fBflushoutput\fR\fR
899 .sp .6
900 .RS 4n
901 If \fBtelnet\fR is in \fBlocalchars\fR mode and the \fBflushoutput\fR character
902 is typed, a \fBTELNET AO\fR sequence (see \fBsend\fR, \fBao\fR) is sent to the
903 remote host. The initial value for the flush character is taken to be the
904 terminal's \fBflush\fR character.
908 .ne 2
910 \fB\fBerase\fR\fR
912 .sp .6
913 .RS 4n
914 If \fBtelnet\fR is in \fBlocalchars\fR mode \fIand\fR operating in "character
915 at a time" mode, then when the \fBerase\fR character is typed, a \fBTELNET
916 EC\fR sequence (see \fBsend\fR, \fBec\fR) is sent to the remote system. The
917 initial value for the \fBerase\fR character is taken to be the terminal's
918 \fBerase\fR character.
922 .ne 2
924 \fB\fBkill\fR\fR
926 .sp .6
927 .RS 4n
928 If \fBtelnet\fR is in \fBlocalchars\fR mode \fIand\fR operating in "character
929 at a time" mode, then when the \fBkill\fR character is typed, a \fBTELNET EL\fR
930 sequence (see \fBsend\fR, \fBel\fR) is sent to the remote system. The initial
931 value for the \fBkill\fR character is taken to be the terminal's \fBkill\fR
932 character.
936 .ne 2
938 \fB\fBeof\fR\fR
940 .sp .6
941 .RS 4n
942 If \fBtelnet\fR is operating in "line by line"/ mode, entering the \fBeof\fR
943 character as the first character on a line sends this character to the remote
944 system. The initial value of \fBeof\fR is taken to be the terminal's \fBeof\fR
945 character.
949 .ne 2
951 \fB\fBayt\fR\fR
953 .sp .6
954 .RS 4n
955 If \fBtelnet\fR is in \fBlocalchars\fR mode, or \fBLINEMODE\fR is enabled, and
956 the status character is typed, a \fBTELNET AYT\fR ("Are You There") sequence is
957 sent to the remote host. (See \fBsend\fR, \fBayt\fR above.) The initial value
958 for \fBayt\fR is the terminal's status character.
962 .ne 2
964 \fB\fBforw1\fR\fR
968 \fB\fBforw2\fR\fR
970 .sp .6
971 .RS 4n
972 If \fBtelnet\fR is operating in \fBLINEMODE,\fR and the \fBforw1\fR or
973 \fBforw2\fR characters are typed, this causes the forwarding of partial lines
974 to the remote system. The initial values for the forwarding characters come
975 from the terminal's \fBeol\fR and \fBeol2\fR characters.
979 .ne 2
981 \fB\fBlnext\fR\fR
983 .sp .6
984 .RS 4n
985 If \fBtelnet\fR is operating in \fBLINEMODE\fR or "old line by line" mode, then
986 the \fBlnext\fR character is assumed to be the terminal's \fBlnext\fR
987 character. The initial value for the \fBlnext\fR character is taken to be the
988 terminal's \fBlnext\fR character.
992 .ne 2
994 \fB\fBreprint\fR\fR
996 .sp .6
997 .RS 4n
998 If \fBtelnet\fR is operating in \fBLINEMODE\fR or "old line by line" mode, then
999 the \fBreprint\fR character is assumed to be the terminal's \fBreprint\fR
1000 character. The initial value for \fBreprint\fR is taken to be the terminal's
1001 \fBreprint\fR character.
1005 .ne 2
1007 \fB\fBrlogin\fR\fR
1009 .sp .6
1010 .RS 4n
1011 This is the \fBrlogin\fR escape character. If set, the normal \fBtelnet\fR
1012 escape character is ignored, unless it is preceded by this character at the
1013 beginning of a line. The \fBrlogin\fR character, at the beginning of a line
1014 followed by a "\fB\&.\fR" closes the connection. When followed by a \fB^Z\fR,
1015 the \fBrlogin\fR command suspends the \fBtelnet\fR command. The initial state
1016 is to disable the \fBrlogin\fR escape character.
1020 .ne 2
1022 \fB\fBstart\fR\fR
1024 .sp .6
1025 .RS 4n
1026 If the \fBTELNET TOGGLE-FLOW-CONTROL\fR option has been enabled, then the
1027 \fBstart\fR character is taken to be the terminal's \fBstart\fR character. The
1028 initial value for the \fBkill\fR character is taken to be the terminal's
1029 \fBstart\fR character.
1033 .ne 2
1035 \fB\fBstop\fR\fR
1037 .sp .6
1038 .RS 4n
1039 If the \fBTELNET TOGGLE-FLOW-CONTROL\fR option has been enabled, then the
1040 \fBstop\fR character is taken to be the terminal's \fBstop\fR character. The
1041 initial value for the \fBkill\fR character is taken to be the terminal's
1042 \fBstop\fR character.
1046 .ne 2
1048 \fB\fBsusp\fR\fR
1050 .sp .6
1051 .RS 4n
1052 If \fBtelnet\fR is in \fBlocalchars\fR mode, or \fBLINEMODE\fR is enabled, and
1053 the \fBsuspend\fR character is typed, a \fBTELNET SUSP\fR sequence (see
1054 \fBsend\fR, \fBsusp\fR above) is sent to the remote host. The initial value for
1055 the \fBsuspend\fR character is taken to be the terminal's \fBsuspend\fR
1056 character.
1060 .ne 2
1062 \fB\fBtracefile\fR\fR
1064 .sp .6
1065 .RS 4n
1066 This is the file to which the output, generated when the \fBnetdata\fR or the
1067 \fBdebug\fR option is \fBTRUE\fR, will be written. If \fBtracefile\fR is set to
1068 "\fB-\fR", then tracing information will be written to standard output (the
1069 default).
1073 .ne 2
1075 \fB\fBworderase\fR\fR
1077 .sp .6
1078 .RS 4n
1079 If \fBtelnet\fR is operating in \fBLINEMODE\fR or "old line by line" mode, then
1080 this character is taken to be the terminal's \fBworderase\fR character. The
1081 initial value for the \fBworderase\fR character is taken to be the terminal's
1082 \fBworderase\fR character.
1086 .ne 2
1088 \fB\fB?\fR\fR
1090 .sp .6
1091 .RS 4n
1092 Displays the legal \fBset\fR and \fBunset\fR commands.
1098 .ne 2
1100 \fB\fBslc\fR \fIstate\fR\fR
1102 .sp .6
1103 .RS 4n
1104 The \fBslc\fR (Set Local Characters) command is used to set or change the state
1105 of special characters when the \fBTELNET LINEMODE\fR option has been enabled.
1106 Special characters are characters that get mapped to \fBTELNET\fR commands
1107 sequences (like \fBip\fR or \fBquit\fR) or line editing characters (like
1108 \fBerase\fR and \fBkill\fR). By default, the local special characters are
1109 exported. The following values for \fIstate\fR are valid:
1111 .ne 2
1113 \fB\fBcheck\fR\fR
1115 .sp .6
1116 .RS 4n
1117 Verifies the settings for the current special characters. The remote side is
1118 requested to send all the current special character settings. If there are any
1119 discrepancies with the local side, the local settings will switch to the remote
1120 values.
1124 .ne 2
1126 \fB\fBexport\fR\fR
1128 .sp .6
1129 .RS 4n
1130 Switches to the local defaults for the special characters. The local default
1131 characters are those of the local terminal at the time when \fBtelnet\fR was
1132 started.
1136 .ne 2
1138 \fB\fBimport\fR\fR
1140 .sp .6
1141 .RS 4n
1142 Switches to the remote defaults for the special characters. The remote default
1143 characters are those of the remote system at the time when the \fBTELNET\fR
1144 connection was established.
1148 .ne 2
1150 \fB\fB?\fR\fR
1152 .sp .6
1153 .RS 4n
1154 Prints out help information for the \fBslc\fR command.
1160 .ne 2
1162 \fB\fBtoggle\fR \fIargument\fR...\fR
1164 .sp .6
1165 .RS 4n
1166 Toggle between \fBTRUE\fR and \fBFALSE\fR the various flags that control how
1167 \fBtelnet\fR responds to events. More than one argument may be specified. The
1168 state of these flags may be interrogated with the \fBdisplay\fR command. Valid
1169 arguments are:
1171 .ne 2
1173 \fB\fBauthdebug\fR\fR
1175 .RS 20n
1176 Turns on debugging information for the authentication code.
1180 .ne 2
1182 \fB\fBautodecrypt\fR\fR
1184 .RS 20n
1185 When the \fBTELNET\fR \fBENCRYPT\fR option is negotiated, by default the actual
1186 encryption (decryption) of the data stream does not start automatically. The
1187 autoencrypt (autodecrypt) command states that encryption of the output (input)
1188 stream should be enabled as soon as possible.
1192 .ne 2
1194 \fB\fBautologin\fR\fR
1196 .RS 20n
1197 If the remote side supports the \fBTELNET\fR \fBAUTHENTICATION\fR option,
1198 \fBtelnet\fR attempts to use it to perform automatic authentication. If the
1199 \fBAUTHENTICATION\fR option is not supported, the user's login name is
1200 propagated through the \fBTELNET\fR \fBENVIRON\fR option. This command is the
1201 same as specifying the \fB-a\fR option on the \fBopen\fR command.
1205 .ne 2
1207 \fB\fBautoflush\fR\fR
1209 .RS 20n
1210 If \fBautoflush\fR and \fBlocalchars\fR are both \fBTRUE,\fR then when the
1211 \fBao\fR, \fBintr\fR, or \fBquit\fR characters are recognized (and transformed
1212 into \fBTELNET\fR sequences; see \fBset\fR for details), \fBtelnet\fR refuses
1213 to display any data on the user's terminal until the remote system acknowledges
1214 (using a \fBTELNET\fR Timing Mark option) that it has processed those
1215 \fBTELNET\fR sequences. The initial value for this toggle is \fBTRUE\fR if the
1216 terminal user has not done an "stty noflsh". Otherwise, the value is
1217 \fBFALSE\fR (see \fBstty\fR(1)).
1221 .ne 2
1223 \fB\fBautosynch\fR\fR
1225 .RS 20n
1226 If \fBautosynch\fR and \fBlocalchars\fR are both \fBTRUE\fR, then when either
1227 the \fBinterrupt\fR or \fBquit\fR characters are typed (see \fBset\fR for
1228 descriptions of \fBinterrupt\fR and \fBquit\fR), the resulting \fBTELNET\fR
1229 sequence sent is followed by the \fBTELNET SYNCH\fR sequence. This procedure
1230 \fIshould\fR cause the remote system to begin throwing away all previously
1231 typed input until both of the \fBTELNET\fR sequences have been read and acted
1232 upon. The initial value of this toggle is \fBFALSE\fR.
1236 .ne 2
1238 \fB\fBbinary\fR\fR
1240 .RS 20n
1241 Enable or disable the \fBTELNET BINARY\fR option on both input and output.
1245 .ne 2
1247 \fB\fBinbinary\fR\fR
1249 .RS 20n
1250 Enable or disable the \fBTELNET BINARY\fR option on input.
1254 .ne 2
1256 \fB\fBoutbinary\fR\fR
1258 .RS 20n
1259 Enable or disable the \fBTELNET BINARY\fR option on output.
1263 .ne 2
1265 \fB\fBcrlf\fR\fR
1267 .RS 20n
1268 Determines how carriage returns are sent. If the value is \fBTRUE\fR, then
1269 carriage returns will be sent as \fB<CR><LF>\fR\&. If the value is \fBFALSE\fR,
1270 then carriage returns will be send as \fB<CR><NUL>\fR\&. The initial value for
1271 this toggle is \fBFALSE\fR.
1275 .ne 2
1277 \fB\fBcrmod\fR\fR
1279 .RS 20n
1280 Toggle RETURN mode. When this mode is enabled, most RETURN characters received
1281 from the remote host will be mapped into a RETURN followed by a line feed. This
1282 mode does not affect those characters typed by the user, only those received
1283 from the remote host. This mode is useful only for remote hosts that send
1284 RETURN but never send LINEFEED. The initial value for this toggle is
1285 \fBFALSE\fR.
1289 .ne 2
1291 \fB\fBdebug\fR\fR
1293 .RS 20n
1294 Toggle socket level debugging (only available to the super-user). The initial
1295 value for this toggle is \fBFALSE\fR.
1299 .ne 2
1301 \fB\fBencdebug\fR\fR
1303 .RS 20n
1304 Turns on debugging information for the encryption code.
1308 .ne 2
1310 \fB\fBlocalchars\fR\fR
1312 .RS 20n
1313 If this toggle is \fBTRUE\fR, then the \fBflush\fR, \fBinterrupt\fR,
1314 \fBquit\fR, \fBerase\fR, and \fBkill\fR characters (see \fBset\fR) are
1315 recognized locally, and transformed into appropriate \fBTELNET\fR control
1316 sequences, respectively \fBao\fR, \fBip\fR, \fBbrk\fR, \fBec\fR, and \fBel\fR
1317 (see \fBsend\fR). The initial value for this toggle is \fBTRUE\fR in "line by
1318 line" mode, and \fBFALSE\fR in "character at a time" mode. When the
1319 \fBLINEMODE\fR option is enabled, the value of \fBlocalchars\fR is ignored, and
1320 assumed always to be \fBTRUE\fR. If \fBLINEMODE\fR has ever been enabled, then
1321 \fBquit\fR is sent as \fBabort\fR, and \fBeof\fR and \fBsuspend\fR are sent as
1322 \fBeof\fR and \fBsusp\fR (see \fBsend\fR above).
1326 .ne 2
1328 \fB\fBnetdata\fR\fR
1330 .RS 20n
1331 Toggle the display of all network data (in hexadecimal format). The initial
1332 value for this toggle is \fBFALSE\fR.
1336 .ne 2
1338 \fB\fBoptions\fR\fR
1340 .RS 20n
1341 Toggle the display of some internal \fBTELNET\fR protocol processing (having to
1342 do with \fBtelnet\fR options). The initial value for this toggle is
1343 \fBFALSE\fR.
1347 .ne 2
1349 \fB\fBprettydump\fR\fR
1351 .RS 20n
1352 When the \fBnetdata\fR toggle is enabled, if \fBprettydump\fR is enabled, the
1353 output from the \fBnetdata\fR command will be formatted in a more user readable
1354 format. Spaces are put between each character in the output. The beginning of
1355 any \fBTELNET\fR escape sequence is preceded by an asterisk (\fB*\fR) to aid in
1356 locating them.
1360 .ne 2
1362 \fB\fBskiprc\fR\fR
1364 .RS 20n
1365 When the \fBskiprc\fR toggle is \fBTRUE\fR, \fBTELNET\fR skips the reading of
1366 the \fB\&.telnetrc\fR file in the user's home directory when connections are
1367 opened. The initial value for this toggle is \fBFALSE\fR.
1371 .ne 2
1373 \fB\fBtermdata\fR\fR
1375 .RS 20n
1376 Toggles the display of all terminal data (in hexadecimal format). The initial
1377 value for this toggle is \fBFALSE\fR.
1381 .ne 2
1383 \fB\fBverbose_encrypt\fR\fR
1385 .RS 20n
1386 When the \fBverbose_encrypt\fR flag is \fBTRUE\fR, \fBTELNET\fR prints out a
1387 message each time encryption is enabled or disabled. The initial value for this
1388 toggle is \fBFALSE\fR.
1392 .ne 2
1394 \fB\fB?\fR\fR
1396 .RS 20n
1397 Display the legal \fBtoggle\fR commands.
1403 .ne 2
1405 \fB\fBenviron\fR \fIargument\|.\|.\|.\fR\fR
1407 .sp .6
1408 .RS 4n
1409 The \fBenviron\fR command is used to manipulate variables that may be sent
1410 through the \fBTELNET ENVIRON\fR option. The initial set of variables is taken
1411 from the users environment. Only the \fBDISPLAY\fR and \fBPRINTER\fR variables
1412 are exported by default. Valid arguments for the \fBenviron\fR command are:
1414 .ne 2
1416 \fB\fBdefine\fR \fIvariable value\fR\fR
1418 .sp .6
1419 .RS 4n
1420 Define \fIvariable\fR to have a value of \fIvalue\fR. Any variables defined by
1421 this command are automatically exported. The \fIvalue\fR may be enclosed in
1422 single or double quotes, so that tabs and spaces may be included.
1426 .ne 2
1428 \fB\fBundefine\fR \fIvariable\fR\fR
1430 .sp .6
1431 .RS 4n
1432 Remove \fIvariable\fR from the list of environment variables.
1436 .ne 2
1438 \fB\fBexport\fR \fIvariable\fR\fR
1440 .sp .6
1441 .RS 4n
1442 Mark the \fIvariable\fR to be exported to the remote side.
1446 .ne 2
1448 \fB\fBunexport\fR \fIvariable\fR\fR
1450 .sp .6
1451 .RS 4n
1452 Mark the \fIvariable\fR to not be exported unless explicitly requested by the
1453 remote side.
1457 .ne 2
1459 \fB\fBlist\fR\fR
1461 .sp .6
1462 .RS 4n
1463 List the current set of environment variables. Those marked with an asterisk
1464 (\fB*\fR) will be sent automatically. Other variables will be sent only if
1465 explicitly requested.
1469 .ne 2
1471 \fB\fB?\fR\fR
1473 .sp .6
1474 .RS 4n
1475 Prints out help information for the \fBenviron\fR command.
1481 .ne 2
1483 \fB\fBlogout\fR\fR
1485 .sp .6
1486 .RS 4n
1487 Sends the \fBtelnet logout\fR option to the remote side. This command is
1488 similar to a \fBclose\fR command. However, if the remote side does not support
1489 the \fBlogout\fR option, nothing happens. If, however, the remote side does
1490 support the \fBlogout\fR option, this command should cause the remote side to
1491 close the \fBTELNET\fR connection. If the remote side also supports the concept
1492 of suspending a user's session for later reattachment, the \fBlogout\fR
1493 argument indicates that the remote side should terminate the session
1494 immediately.
1497 .SH FILES
1499 .ne 2
1501 \fB\fB$HOME/.telnetrc\fR\fR
1503 .RS 19n
1504 file that contains commands to be executed before initiating a \fBtelnet\fR
1505 session
1508 .SH SEE ALSO
1511 \fBrlogin\fR(1), \fBsh\fR(1), \fBstty\fR(1), \fBgetlogin\fR(3C),
1512 \fBhosts\fR(4), \fBkrb5.conf\fR(4), \fBnologin\fR(4), \fBtelnetrc\fR(4),
1513 \fBattributes\fR(5), \fBinet\fR(7P), \fBinet6\fR(7P)
1514 .SH DIAGNOSTICS
1516 .ne 2
1518 \fB\fBNO LOGINS: System going down in\fR \fIN\fR \fBminutes\fR\fR
1520 .sp .6
1521 .RS 4n
1522 The machine is in the process of being shut down and logins have been disabled.
1525 .SH NOTES
1528 On some remote systems, echo has to be turned off manually when in "line by
1529 line" mode.
1532 In "old line by line" mode, or \fBLINEMODE\fR, the terminal's \fBEOF\fR
1533 character is only recognized (and sent to the remote system) when it is the
1534 first character on a line.
1537 The \fBtelnet\fR protocol only uses single DES for session
1538 protection\(emclients request service tickets with single DES session keys. The
1539 KDC must know that host service principals that offer the \fBtelnet\fR service
1540 support single DES, which, in practice, means that such principals must have
1541 single DES keys in the KDC database.