xref: /original-bsd/usr.bin/telnet/telnet.1 (revision f71c8376)
1.\" Copyright (c) 1983, 1990 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" %sccs.include.redist.man%
5.\"
6.\"     @(#)telnet.1	6.13 (Berkeley) 07/28/90
7.\"
8.Dd
9.Dt TELNET 1
10.Os BSD 4.2
11.Sh NAME
12.Nm telnet
13.Nd user interface to the
14.Li TELNET
15protocol
16.Sh SYNOPSIS
17.Nm telnet
18.Op Fl d
19.Op Fl a
20.Op Fl n Ar tracefile
21.Op Fl e Ar escapechar
22.Ob
23.Op Fl l Ar user
24.Ar host
25.Op port
26.Oe
27.Sh DESCRIPTION
28The
29.Nm telnet
30command
31is used to communicate with another host using the
32.Li TELNET
33protocol.
34If
35.Nm telnet
36is invoked without the
37.Ar host
38argument, it enters command mode,
39indicated by its prompt
40.Pq Nm telnet\&> .
41In this mode, it accepts and executes the commands listed below.
42If it is invoked with arguments, it performs an
43.Ic open
44command with those arguments.
45.Pp
46Options:
47.Tw Fl
48.Tp Fl d
49Sets the initial value of the
50.Ic debug
51toggle to
52.Li TRUE
53.Tp Fl a
54Attempt automatic login.
55Currently, this sends the user name via the USER variable
56of the ENVIRON option if supported by the remote system.
57The name used is that of the current user as returned by
58.Xr getlogin 2
59if it agrees with the current user ID,
60otherwise it is the name associated with the user ID.
61.Tp Cx Fl n
62.Cx \&\ \&
63.Ar tracefile
64.Cx
65Opens
66.Ar tracefile
67for recording trace information.
68See the
69.Ic set tracefile
70command below.
71.Tp Cx Fl l
72.Cx \&\ \&
73.Ar user
74.Cx
75When connecting to the remote system, if the remote system
76understands the ENVIRON option, then
77.Ar user
78will be sent to the remote system as the value for the variable USER.
79This option implies the
80.Fl a
81option.
82This option may also be used with the
83.Ic open
84command.
85.Tp Cx Fl e
86.Cx \&\ \&
87.Ar escape char
88.Cx
89Sets the initial
90.Nm
91.B telnet
92escape character to
93.Ar escape char.
94If
95.Ar escape char
96is ommitted, then
97there will be no escape character.
98.Tp Ar host
99Indicates the official name, an alias, or the Internet address
100of a remote host.
101.Tp Ar port
102Indicates a port number (address of an application).  If a number is
103not specified, the default
104.Nm telnet
105port is used.
106.Tp
107.Pp
108Once a connection has been opened,
109.Nm telnet
110will attempt to enable the
111.Li TELNET LINEMODE
112option.
113If this fails, then
114.Nm telnet
115will revert to one of two input modes:
116either \*(Lqcharacter at a time\*(Rq
117or \*(Lqold line by line\*(Rq
118depending on what the remote system supports.
119.Pp
120When
121.Li LINEMODE
122is enabled, character processing is done on the
123local system, under the control of the remote system.  When input
124editing or character echoing is to be disabled, the remote system
125will relay that information.  The remote system will also relay
126changes to any special characters that happen on the remote
127system, so that they can take effect on the local system.
128.Pp
129In \*(Lqcharacter at a time\*(Rq mode, most
130text typed is immediately sent to the remote host for processing.
131.Pp
132In \*(Lqold line by line\*(Rq mode, all text is echoed locally,
133and (normally) only completed lines are sent to the remote host.
134The \*(Lqlocal echo character\*(Rq (initially \*(Lq^E\*(Rq) may be used
135to turn off and on the local echo
136(this would mostly be used to enter passwords
137without the password being echoed).
138.Pp
139If the
140.Li LINEMODE
141option is enabled, or if the
142.Ic localchars
143toggle is TRUE (the default for \*(Lqold line by line\*(Lq; see below),
144the user's
145.Ic quit  ,
146.Ic intr ,
147and
148.Ic flush
149characters are trapped locally, and sent as
150.Li TELNET
151protocol sequences to the remote side.
152If
153.Li LINEMODE
154has ever been enabled, then the user's
155.Ic susp
156and
157.Ic eof
158are also sent as
159.Li TELNET
160protocol sequences,
161and
162.Ic quit
163is sent as a
164.Li TELNET ABORT
165instead of
166.Li BREAK
167There are options (see
168.Ic toggle
169.Ic autoflush
170and
171.Ic toggle
172.Ic autosynch
173below)
174which cause this action to flush subsequent output to the terminal
175(until the remote host acknowledges the
176.Li TELNET
177sequence) and flush previous terminal input
178(in the case of
179.Ic quit
180and
181.Ic intr  ) .
182.Pp
183While connected to a remote host,
184.Nm telnet
185command mode may be entered by typing the
186.Nm telnet
187\*(Lqescape character\*(Rq (initially \*(Lq^
188\*(Rq).
189When in command mode, the normal terminal editing conventions are available.
190.Pp
191The following .Nm telnet
192commands are available.
193Only enough of each command to uniquely identify it need be typed
194(this is also true for arguments to the
195.Ic mode  ,
196.Ic set ,
197.Ic toggle  ,
198.Ic unset ,
199.Ic slc  ,
200.Ic environ ,
201and
202.Ic display
203commands).
204.Pp
205.Tw Ic
206.Tp Ic close
207Close a
208.Li TELNET
209session and return to command mode.
210.Tp Cx Ic display
211.Cx \&\ \&
212.Ar argument ...
213.Cx
214Displays all, or some, of the
215.Ic set
216and
217.Ic toggle
218values (see below).
219.Tp Cx Ic mode
220.Cx \&\ \&
221.Ar type
222.Cx
223.Ar Type
224is one of several options, depending on the state of the
225.Li TELNET
226session.
227The remote host is asked for permission to go into the requested mode.
228If the remote host is capable of entering that mode, the requested
229mode will be entered.
230.Tw Ar
231.Tp Ic character
232Disable the
233.Li TELNET LINEMODE
234option, or, if the remote side does not understand the
235.Li LINEMODE
236option, then enter \*(Lqcharacter at a time\*(Lq mode.
237.Tp Ic line
238Enable the
239.Li TELNET LINEMODE
240option, or, if the remote side does not understand the
241.Li LINEMODE
242option, then attempt to enter \*(Lqold-line-by-line\*(Lq mode.
243.Tp Cx Ic isig
244.Cx \&\ \&
245.Pq Ic \-isig
246.Cx
247Attempt to enable (disable) the
248.Li TRAPSIG
249mode of the
250.Li LINEMODE
251option.
252This requires that the
253.Li LINEMODE
254option be enabled.
255.Tp Cx Ic edit
256.Cx \&\ \&
257.Pq Ic \-edit
258.Cx
259Attempt to enable (disable) the
260.Li EDIT
261mode of the
262.Li LINEMODE
263option.
264This requires that the
265.Li LINEMODE
266option be enabled.
267.Tp Cx Ic softtabs
268.Cx \&\ \&
269.Pq Ic \-softtabs
270.Cx
271Attempt to enable (disable) the
272.Li SOFT_TAB
273mode of the
274.Li LINEMODE
275option.
276This requires that the
277.Li LINEMODE
278option be enabled.
279.Tp Cx Ic litecho
280.Cx \&\ \&
281.Pq Ic \-litecho
282.Cx
283Attempt to enable (disable) the
284.Li LIT_ECHO
285mode of the
286.Li LINEMODE
287option.
288This requires that the
289.Li LINEMODE
290option be enabled.
291.Tp Ic \&?
292Prints out help information for the
293.Ic mode
294command.
295.Tp
296.Tp Cx Ic open
297.Cx \&\ \&
298.Ar host
299.Cx \&\ \&
300.Cx [
301.Op Fl l
302.Cx \&\ \&
303.Ar user
304.Cx ]
305.Cx [
306.Op Fl
307.Cx \&\ \&
308.Ar port
309.Cx ]
310.Cx
311Open a connection to the named host.
312If no port number
313is specified,
314.Nm telnet
315will attempt to contact a
316.Li TELNET
317server at the default port.
318The host specification may be either a host name (see
319.Xr hosts  5  )
320or an Internet address specified in the \*(Lqdot notation\*(Rq (see
321.Xr inet 3 ) .
322The
323.Op Fl l
324option may be used to specify the user name
325to be passed to the remote system via the
326.Li ENVIRON
327option.
328When connecting to a non-standard port,
329.Nm telnet
330omits any automatic initiation of
331.Li TELNET
332options.  When the port number is preceeded by a minus sign,
333the inital option negotiation is done.
334After establishing a connection, the file
335.Pa \&.telnetrc
336in the
337users home directory is opened.  Lines begining with a # are
338comment lines.  Blank lines are ignored.  Lines that begin
339without whitespace are the start of a machine entry.  The
340first thing on the line is the name of the machine that is
341being connected to.  The rest of the line, and successive
342lines that begin with whitespace are assumed to be
343.Nm telnet
344commands and are processed as if they had been typed
345in manually to the
346.Nm telnet
347command prompt.
348.Tp Ic quit
349Close any open
350.Li TELNET
351session and exit
352.Nm telnet  .
353An end of file (in command mode) will also close a session and exit.
354.Tp Cx Ic send
355.Cx \&\ \&
356.Ar arguments
357.Cx
358Sends one or more special character sequences to the remote host.
359The following are the arguments which may be specified
360(more than one argument may be specified at a time):
361.Pp
362.Tw Ds
363.Tp Ic abort
364Sends the
365.Li TELNET ABORT
366(ABORT processes)
367sequence.
368.Tp Ic ao
369Sends the
370.Li TELNET AO
371(Abort Output) sequence, which should cause the remote system to flush
372all output
373.Em from
374the remote system
375.Em to
376the user's terminal.
377.Tp Ic ayt
378Sends the
379.Li TELNET AYT
380(Are You There)
381sequence, to which the remote system may or may not choose to respond.
382.Tp Ic brk
383Sends the
384.Li TELNET BRK
385(Break) sequence, which may have significance to the remote
386system.
387.Tp Ic ec
388Sends the
389.Li TELNET EC
390(Erase Character)
391sequence, which should cause the remote system to erase the last character
392entered.
393.Tp Ic el
394Sends the
395.Li TELNET EL
396(Erase Line)
397sequence, which should cause the remote system to erase the line currently
398being entered.
399.Tp Ic eof
400Sends the
401.Li TELNET EOF
402(End Of File)
403sequence.
404.Tp Ic eor
405Sends the
406.Li TELNET EOR
407(End of Record)
408sequence.
409.Tp Ic escape
410Sends the current
411.Nm telnet
412escape character (initially \*(Lq^\*(Rq).
413.Tp Ic ga
414Sends the
415.Li TELNET GA
416(Go Ahead)
417sequence, which likely has no significance to the remote system.
418.Tp Ic getstatus
419If the remote side supports the
420.Li TELNET STATUS
421command,
422.Ic getstatus
423will send the subnegotiation to request that the server send
424its current option status.
425.Tp Ic ip
426Sends the
427.Li TELNET IP
428(Interrupt Process) sequence, which should cause the remote
429system to abort the currently running process.
430.Tp Ic nop
431Sends the
432.Li TELNET NOP
433(No OPeration)
434sequence.
435.Tp Ic susp
436Sends the
437.Li TELNET SUSP
438(SUSPend process)
439sequence.
440.Tp Ic synch
441Sends the
442.Li TELNET SYNCH
443sequence.
444This sequence causes the remote system to discard all previously typed
445(but not yet read) input.
446This sequence is sent as TCP urgent
447data (and may not work if the remote system is a 4.2 BSD system -- if
448it doesn't work, a lower case \*(Lqr\*(Rq may be echoed on the terminal).
449.Tp Ic \&?
450Prints out help information for the
451.Ic send
452command.
453.Tp
454.Tp Cx Ic set
455.Cx \&\ \&
456.Ar argument value
457.Cx
458.Tp Cx Ic unset
459.Cx \&\ \&
460.Ar argument value
461.Cx
462The
463.Ic set
464command will set any one of a number of
465.Nm telnet
466variables to a specific value or to TRUE.
467The special value
468.Ic off
469turns off the function associated with
470the variable, this is equivalent to using the
471.Ic unset
472command.
473The
474.Ic unset
475command will disable or set to FALSE any of the specified functions.
476The values of variables may be interrogated with the
477.Ic display
478command.
479The variables which may be set or unset, but not toggled, are
480listed here.  In addition, any of the variables for the
481.Ic toggle
482command may be explicitly set or unset using
483the
484.Ic set
485and
486.Ic unset
487commands.
488.Tw Fl
489.Tp Ic echo
490This is the value (initially \*(Lq^E\*(Rq) which, when in
491\*(Lqline by line\*(Rq mode, toggles between doing local echoing
492of entered characters (for normal processing), and suppressing
493echoing of entered characters (for entering, say, a password).
494.Tp Ic eof
495If
496.Nm telnet
497is operating in
498.Li LINEMODE
499or \*(Lqold line by line\*(Rq mode, entering this character
500as the first character on a line will cause this character to be
501sent to the remote system.
502The initial value of the eof character is taken to be the terminal's
503.Ic eof
504character.
505.Tp Ic erase
506If
507.Nm telnet
508is in
509.Ic localchars
510mode (see
511.Ic toggle
512.Ic localchars
513below),
514.Sy and
515if
516.Nm telnet
517is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
518character is typed, a
519.Li TELNET EC
520sequence (see
521.Ic send
522.Ic ec
523above)
524is sent to the remote system.
525The initial value for the erase character is taken to be
526the terminal's
527.Ic erase
528character.
529.Tp Ic escape
530This is the
531.Nm telnet
532escape character (initially \*(Lq^[\*(Rq) which causes entry
533into
534.Nm telnet
535command mode (when connected to a remote system).
536.Tp Ic flushoutput
537If
538.Nm telnet
539is in
540.Ic localchars
541mode (see
542.Ic toggle
543.Ic localchars
544below)
545and the
546.Ic flushoutput
547character is typed, a
548.Li TELNET AO
549sequence (see
550.Ic send
551.Ic ao
552above)
553is sent to the remote host.
554The initial value for the flush character is taken to be
555the terminal's
556.Ic flush
557character.
558.Tp Ic interrupt
559If
560.Nm telnet
561is in
562.Ic localchars
563mode (see
564.Ic toggle
565.Ic localchars
566below)
567and the
568.Ic interrupt
569character is typed, a
570.Li TELNET IP
571sequence (see
572.Ic send
573.Ic ip
574above)
575is sent to the remote host.
576The initial value for the interrupt character is taken to be
577the terminal's
578.Ic intr
579character.
580.Tp Ic kill
581If
582.Nm telnet
583is in
584.Ic localchars
585mode (see
586.Ic toggle
587.Ic localchars
588below),
589.Ic and
590if
591.Nm telnet
592is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
593character is typed, a
594.Li TELNET EL
595sequence (see
596.Ic send
597.Ic el
598above)
599is sent to the remote system.
600The initial value for the kill character is taken to be
601the terminal's
602.Ic kill
603character.
604.Tp Ic lnext
605If
606.Nm telnet
607is operating in
608.Li LINEMODE
609or \*(Lqold line by line\*(Lq mode, then this character is taken to
610be the terminal's
611.Ic lnext
612character.
613The initial value for the lnext character is taken to be
614the terminal's
615.Ic lnext
616character.
617.Tp Ic quit
618If
619.Nm telnet
620is in
621.Ic localchars
622mode (see
623.Ic toggle
624.Ic localchars
625below)
626and the
627.Ic quit
628character is typed, a
629.Li TELNET BRK
630sequence (see
631.Ic send
632.Ic brk
633above)
634is sent to the remote host.
635The initial value for the quit character is taken to be
636the terminal's
637.Ic quit
638character.
639.Tp Ic reprint
640If
641.Nm telnet
642is operating in
643.Li LINEMODE
644or \*(Lqold line by line\*(Lq mode, then this character is taken to
645be the terminal's
646.Ic reprint
647character.
648The initial value for the reprint character is taken to be
649the terminal's
650.Ic reprint
651character.
652.Tp Ic start
653If the
654.Li TELNET TOGGLE-FLOW-CONTROL
655option has been enabled,
656then this character is taken to
657be the terminal's
658.Ic start
659character.
660The initial value for the kill character is taken to be
661the terminal's
662.Ic start
663character.
664.Tp Ic stop
665If the
666.Li TELNET TOGGLE-FLOW-CONTROL
667option has been enabled,
668then this character is taken to
669be the terminal's
670.Ic stop
671character.
672The initial value for the kill character is taken to be
673the terminal's
674.Ic stop
675character.
676.Tp Ic susp
677If
678.Nm telnet
679is in
680.Ic localchars
681mode, or
682.Li LINEMODE
683is enabled, and the
684.Ic suspend
685character is typed, a
686.Li TELNET SUSP
687sequence (see
688.Ic send
689.Ic susp
690above)
691is sent to the remote host.
692The initial value for the suspend character is taken to be
693the terminal's
694.Ic suspend
695character.
696.Tp Ic tracefile
697Thi is the file to which the output, caused by
698.Ic netdata
699or
700.Ic option
701tracing being TRUE, will be written.  If it is set to
702.Dq Fl ,
703then tracing information will be written to standard output (the default).
704.Tp Ic worderase
705If
706.Nm telnet
707is operating in
708.Li LINEMODE
709or \*(Lqold line by line\*(Lq mode, then this character is taken to
710be the terminal's
711.Ic worderase
712character.
713The initial value for the worderase character is taken to be
714the terminal's
715.Ic worderase
716character.
717.Tp Ic \&?
718Displays the legal
719.Ic set
720.Pq Ic unset
721commands.
722.Tp
723.Tp Cx Ic slc
724.Cx \&\ \&
725.Ar state
726.Cx
727The
728.Ic slc
729command (Set Local Characters) is used to set
730or change the state of the the special
731characters when the
732.Li TELNET LINEMODE
733option has
734been enabled.  Special characters are characters that get
735mapped to
736.Li TELNET
737commands sequences (like
738.Ic ip
739or
740.Ic quit  )
741or line editing characters (like
742.Ic erase
743and
744.Ic kill  ) .
745By default, the local special characters are exported.
746.Tw Fl
747.Tp Ic export
748Switch to the local defaults for the special characters.  The
749local default characters are those of the local terminal at
750the time when
751.Nm telnet
752was started.
753.Tp Ic import
754Switch to the remote defaults for the special characters.
755The remote default characters are those of the remote system
756at the time when the
757.Li TELNET
758connection was established.
759.Tp Ic check
760Verify the current settings for the current special characters.
761The remote side is requested to send all the current special
762character settings, and if there are any discrepencies with
763the local side, the local side will switch to the remote value.
764.Tp Ic \&?
765Prints out help information for the
766.Ic slc
767command.
768.Tp
769.Tp Cx Ic environ
770.Cx \&\ \&
771.Ar arguments...
772.Cx
773The
774.Ic environ
775command is used to manipulate the
776the variables that my be sent through the
777.Li TELNET ENVIRON
778option.
779The initial set of variables is taken from the users
780environment, with only the
781.Ev DISPLAY
782and
783.Ev PRINTER
784variables being exported by default.
785The
786.Ev USER
787variable is also exported if the
788.Fl a
789or
790.Fl l
791options are used.
792.br
793Valid arguments for the \fBenviron\fP command are:
794.Tw Fl
795.Tp Cx Ic define
796.Cx \&\ \&
797.Ar variable value
798.Cx
799Define the variable
800.Ar variable
801to have a value of
802.Ar value.
803Any variables defined by this command are automatically exported.
804The
805.Ar value
806may be enclosed in single or double quotes so
807that tabs and spaces may be included.
808.Tp Cx Ic undefine
809.Cx \&\ \&
810.Ar variable
811.Cx
812Remove
813.Ar variable
814from the list of environment variables.
815.Tp Cx Ic export
816.Cx \&\ \&
817.Ar variable
818.Cx
819Mark the variable
820.Ar variable
821to be exported to the remote side.
822.Tp Cx Ic unexport
823.Cx \&\ \&
824.Ar variable
825.Cx
826Mark the variable
827.Ar variable
828to not be exported unless
829explicitly asked for by the remote side.
830.Tp Ic list
831List the current set of environment variables.
832Those marked with a \fB*\fR will be sent automatically,
833other variables will only be sent if explicitly requested.
834.Tp Ic \&?
835Prints out help information for the
836.Ic environ
837command.
838.Tp
839.Tp Cx Ic toggle
840.Cx \&\ \&
841.Ar arguments ...
842.Cx
843Toggle (between
844TRUE
845and
846FALSE)
847various flags that control how
848.Nm telnet
849responds to events.
850These flags may be set explicitly to TRUE or FALSE
851using the
852.Ic set
853and
854.Ic unset
855commands listed above.
856More than one argument may be specified.
857The state of these flags may be interrogated with the
858.Ic display
859command.
860Valid arguments are:
861.Tw Ar
862.Tp Ic autoflush
863If
864.Ic autoflush
865and
866.Ic localchars
867are both
868TRUE,
869then when the
870.Ic ao  ,
871or
872.Ic quit
873characters are recognized (and transformed into
874.Li TELNET
875sequences; see
876.Ic set
877above for details),
878.Nm telnet
879refuses to display any data on the user's terminal
880until the remote system acknowledges (via a
881.Li TELNET TIMING MARK
882option)
883that it has processed those
884.Li TELNET
885sequences.
886The initial value for this toggle is TRUE if the terminal user had not
887done an "stty noflsh", otherwise FALSE (see
888.Xr stty  1  ) .
889.Tp Ic autosynch
890If
891.Ic autosynch
892and
893.Ic localchars
894are both
895TRUE,
896then when either the
897.Ic intr
898or
899.Ic quit
900characters is typed (see
901.Ic set
902above for descriptions of the
903.Ic intr
904and
905.Ic quit
906characters), the resulting
907.Li TELNET
908sequence sent is followed by the
909.Li TELNET SYNCH
910sequence.
911This procedure
912.Ic should
913cause the remote system to begin throwing away all previously
914typed input until both of the
915.Li TELNET
916sequences have been read and acted upon.
917The initial value of this toggle is FALSE.
918.Tp Ic binary
919Enable or disable the
920.Li TELNET BINARY
921option on both input and output.
922.Tp Ic inbinary
923Enable or disable the
924.Li TELNET BINARY
925option on input.
926.Tp Ic outbinary
927Enable or disable the
928.Li TELNET BINARY
929option on output.
930.Tp Ic crlf
931If this is TRUE, then carriage returns will be sent as <CR><LF>.
932If this is FALSE, then carriage returns will be send as <CR><NUL>.
933The initial value for this toggle is FALSE.
934.Tp Ic crmod
935Toggle carriage return mode.
936When this mode is enabled, most carriage return characters received from
937the remote host will be mapped into a carriage return followed by
938a line feed.
939This mode does not affect those characters typed by the user, only
940those received from the remote host.
941This mode is not very useful unless the remote host
942only sends carriage return, but never line feed.
943The initial value for this toggle is FALSE.
944.Tp Ic debug
945Toggles socket level debugging (useful only to the
946.Ic super user  ) .
947The initial value for this toggle is FALSE.
948.Tp Ic localchars
949If this is
950TRUE,
951then the
952.Ic flush  ,
953.Ic interrupt ,
954.Ic quit  ,
955.Ic erase ,
956and
957.Ic kill
958characters (see
959.Ic set
960above) are recognized locally, and transformed into (hopefully) appropriate
961.Li TELNET
962control sequences
963(respectively
964.Ic ao  ,
965.Ic ip ,
966.Ic brk  ,
967.Ic ec ,
968and
969.Ic el  ;
970see
971.Ic send
972above).
973The initial value for this toggle is TRUE in \*(Lqold line by line\*(Rq mode,
974and FALSE in \*(Lqcharacter at a time\*(Rq mode.
975When the
976.Li LINEMODE
977option is enabled, the value of
978.Ic localchars
979is ignored, and assumed to always be TRUE.
980If
981.Li LINEMODE
982has ever been enabled, then
983.Ic quit
984is sent as
985.Ic abort  ,
986and
987.Ic eof and
988.B suspend
989are sent as
990.Ic eof and
991.Ic susp ,
992see
993.Ic send
994above).
995.Tp Ic netdata
996Toggles the display of all network data (in hexadecimal format).
997The initial value for this toggle is FALSE.
998.Tp Ic options
999Toggles the display of some internal
1000.Nm telnet
1001protocol processing (having to do with
1002.Li TELNET
1003options).
1004The initial value for this toggle is FALSE.
1005.Tp Ic prettydump
1006When the
1007.Ic netdata
1008toggle is enabled, if
1009.Ic prettydump
1010is enabled the output from the
1011.Ic netdata
1012command will be formated in a more user readable format.
1013Spaces are put between each character in the output, and the
1014begining of any
1015.Li TELNET
1016escape sequence is preceeded by a '*' to aid in locating them.
1017.Tp Ic \&?
1018Displays the legal
1019.Ic toggle
1020commands.
1021.Tp
1022.Tp Ic z
1023Suspend
1024.Nm telnet  .
1025This command only works when the user is using the
1026.Xr csh  1  .
1027.Tp Cx Ic \&!
1028.Cx \&\ \&
1029.Op Ar command
1030.Cx
1031Execute a single command in a subshell on the local
1032system.  If
1033.Ic command
1034is ommitted, then an interactive
1035subshell is invoked.
1036.Tp Ic status
1037Show the current status of
1038.Nm telnet  .
1039This includes the peer one is connected to, as well
1040as the current mode.
1041.Tp Cx Ic \&?
1042.Cx \&\ \&
1043.Op Ar command
1044.Cx
1045Get help.  With no arguments,
1046.Nm telnet
1047prints a help summary.
1048If a command is specified,
1049.Nm telnet
1050will print the help information for just that command.
1051.Sh ENVIRONMENT
1052.Nm Telnet
1053uses at least the
1054.Ev HOME ,
1055.Ev SHELL ,
1056.Ev DISPLAY ,
1057and
1058.Ev TERM
1059environent variables.
1060Other envirnoment variables may be propogated
1061to the other side via the
1062.Li TELNET ENVIRON
1063option.
1064.Sh FILES
1065.Dw ~/.telnetrc
1066.Di L
1067.Dp Pa ~/.telnetrc
1068user customized telnet startup values
1069.Dp
1070.Sh HISTORY
1071.Nm Telnet
1072appeared in 4.2 BSD.
1073.Sh NOTES
1074.Pp
1075On some remote systems, echo has to be turned off manually when in
1076\*(Lqold line by line\*(Rq mode.
1077.Pp
1078In \*(Lqold line by line\*(Rq mode or
1079.Li LINEMODE
1080the terminal's
1081.Ic eof
1082character is only recognized (and sent to the remote system)
1083when it is the first character on a line.
1084