xref: /csrg-svn/usr.bin/telnet/telnet.1 (revision 43085)
1*43085Scael.\" Copyright (c) 1983, 1990 The Regents of the University of California.
235656Sbostic.\" All rights reserved.
319759Smckusick.\"
4*43085Scael.\" %sccs.include.redist.man%
519759Smckusick.\"
6*43085Scael.\"     @(#)telnet.1	6.9 (Berkeley) 06/11/90
735656Sbostic.\"
8*43085Scael.Dd
9*43085Scael.Dt TELNET 1
10*43085Scael.Os BSD 4.2
11*43085Scael.Sh NAME
12*43085Scael.Nm telnet
13*43085Scael.Nd user interface to the
14*43085Scael.Li TELNET
15*43085Scaelprotocol
16*43085Scael.Sh SYNOPSIS
17*43085Scael.Nm telnet
18*43085Scael.Op Fl d
19*43085Scael.Op Fl n Ar tracefile
20*43085Scael.Op Ar host Op Ar port
21*43085Scael.Sh DESCRIPTION
2238711SbormanThe
23*43085Scael.Nm telnet
2438711Sbormancommand
25*43085Scaelis used to communicate with another host using the
26*43085Scael.Li TELNET
27*43085Scaelprotocol.
28*43085ScaelIf
29*43085Scael.Nm telnet
3038711Sbormanis invoked without the
31*43085Scael.Ar host
3238711Sbormanargument, it enters command mode,
33*43085Scaelindicated by its prompt
34*43085Scael.Pq Nm telnet\&> .
3519759SmckusickIn this mode, it accepts and executes the commands listed below.
3619759SmckusickIf it is invoked with arguments, it performs an
37*43085Scael.Ic open
38*43085Scaelcommand with those arguments.
39*43085Scael.Pp
40*43085ScaelOptions:
41*43085Scael.Tw Fl
42*43085Scael.Tp Fl d
43*43085ScaelSets the initial value of the
44*43085Scael.Ic debug
45*43085Scaeltoggle to
46*43085Scael.Li TRUE
47*43085Scael.Tp Cx Fl n
48*43085Scael.Cx \&\ \&
49*43085Scael.Ar tracefile
50*43085Scael.Cx
51*43085ScaelOpens
52*43085Scael.Ar tracefile
53*43085Scaelfor recording trace information.
54*43085ScaelSee the
55*43085Scael.Ic set tracefile
56*43085Scaelcommand below.
57*43085Scael.Tp Ar host
58*43085ScaelIndicates the official name, an alias, or the Internet address
59*43085Scaelof a remote host.
60*43085Scael.Tp Ar port
61*43085ScaelIndicates a port number (address of an application).  If a number is
62*43085Scaelnot specified, the default
63*43085Scael.Nm telnet
64*43085Scaelport is used.
65*43085Scael.Tp
66*43085Scael.Pp
6719759SmckusickOnce a connection has been opened,
68*43085Scael.Nm telnet
6938711Sbormanwill attempt to enable the
70*43085Scael.Li TELNET LINEMODE
7138711Sbormanoption.
7238711SbormanIf this fails, then
73*43085Scael.Nm telnet
7438711Sbormanwill revert to one of two input modes:
75*43085Scaeleither \*(Lqcharacter at a time\*(Rq
76*43085Scaelor \*(Lqold line by line\*(Rq
7727692Sminshalldepending on what the remote system supports.
78*43085Scael.Pp
79*43085ScaelWhen
80*43085Scael.Li LINEMODE
81*43085Scaelis enabled, character processing is done on the
8238711Sbormanlocal system, under the control of the remote system.  When input
8338711Sbormanediting or character echoing is to be disabled, the remote system
8438711Sbormanwill relay that information.  The remote system will also relay
8538711Sbormanchanges to any special characters that happen on the remote
8638711Sbormansystem, so that they can take effect on the local system.
87*43085Scael.Pp
88*43085ScaelIn \*(Lqcharacter at a time\*(Rq mode, most
8927692Sminshalltext typed is immediately sent to the remote host for processing.
90*43085Scael.Pp
91*43085ScaelIn \*(Lqold line by line\*(Rq mode, all text is echoed locally,
9227692Sminshalland (normally) only completed lines are sent to the remote host.
93*43085ScaelThe \*(Lqlocal echo character\*(Rq (initially \*(Lq^E\*(Rq) may be used
9427692Sminshallto turn off and on the local echo
9527692Sminshall(this would mostly be used to enter passwords
9627692Sminshallwithout the password being echoed).
97*43085Scael.Pp
98*43085ScaelIf the
99*43085Scael.Li LINEMODE
100*43085Scaeloption is enabled, or if the
101*43085Scael.Ic localchars
102*43085Scaeltoggle is TRUE (the default for \*(Lqold line by line\*(Lq; see below),
10327692Sminshallthe user's
104*43085Scael.Ic quit  ,
105*43085Scael.Ic intr ,
10627692Sminshalland
107*43085Scael.Ic flush
10827692Sminshallcharacters are trapped locally, and sent as
109*43085Scael.Li TELNET
11027692Sminshallprotocol sequences to the remote side.
111*43085ScaelIf
112*43085Scael.Li LINEMODE
113*43085Scaelhas ever been enabled, then the user's
114*43085Scael.Ic susp
11538711Sbormanand
116*43085Scael.Ic eof
11738711Sbormanare also sent as
118*43085Scael.Li TELNET
11938711Sbormanprotocol sequences,
12038711Sbormanand
121*43085Scael.Ic quit
122*43085Scaelis sent as a
123*43085Scael.Li TELNET ABORT
124*43085Scaelinstead of
125*43085Scael.Li BREAK
12627692SminshallThere are options (see
127*43085Scael.Ic toggle
128*43085Scael.Ic autoflush
12927692Sminshalland
130*43085Scael.Ic toggle
131*43085Scael.Ic autosynch
13227692Sminshallbelow)
13327692Sminshallwhich cause this action to flush subsequent output to the terminal
13427692Sminshall(until the remote host acknowledges the
135*43085Scael.Li TELNET
13627692Sminshallsequence) and flush previous terminal input
13727692Sminshall(in the case of
138*43085Scael.Ic quit
13927692Sminshalland
140*43085Scael.Ic intr  ) .
141*43085Scael.Pp
14227692SminshallWhile connected to a remote host,
143*43085Scael.Nm telnet
14427692Sminshallcommand mode may be entered by typing the
145*43085Scael.Nm telnet
146*43085Scael\*(Lqescape character\*(Rq (initially \*(Lq^
147*43085Scael\*(Rq).
14819759SmckusickWhen in command mode, the normal terminal editing conventions are available.
149*43085Scael.Pp
150*43085ScaelThe following .Nm telnet
151*43085Scaelcommands are available.
15227692SminshallOnly enough of each command to uniquely identify it need be typed
15327692Sminshall(this is also true for arguments to the
154*43085Scael.Ic mode  ,
155*43085Scael.Ic set ,
156*43085Scael.Ic toggle  ,
157*43085Scael.Ic unset ,
158*43085Scael.Ic slc  ,
15927692Sminshalland
160*43085Scael.Ic display
16127692Sminshallcommands).
162*43085Scael.Pp
163*43085Scael.Tw Ic
164*43085Scael.Tp Ic close
16527692SminshallClose a
166*43085Scael.Li TELNET
16727692Sminshallsession and return to command mode.
168*43085Scael.Tp Cx Ic display
169*43085Scael.Cx \&\ \&
170*43085Scael.Ar argument ...
171*43085Scael.Cx
17238711SbormanDisplays all, or some, of the
173*43085Scael.Ic set
17438711Sbormanand
175*43085Scael.Ic toggle
17638711Sbormanvalues (see below).
177*43085Scael.Tp Cx Ic mode
178*43085Scael.Cx \&\ \&
179*43085Scael.Ar type
180*43085Scael.Cx
181*43085Scael.Ar Type
18238711Sbormanis one of several options, depending on the state of the
183*43085Scael.Li TELNET
18438711Sbormansession.
18527692SminshallThe remote host is asked for permission to go into the requested mode.
18627692SminshallIf the remote host is capable of entering that mode, the requested
18727692Sminshallmode will be entered.
188*43085Scael.Tw Ar
189*43085Scael.Tp Ic character
19038711SbormanDisable the
191*43085Scael.Li TELNET LINEMODE
19238711Sbormanoption, or, if the remote side does not understand the
193*43085Scael.Li LINEMODE
194*43085Scaeloption, then enter \*(Lqcharacter at a time\*(Lq mode.
195*43085Scael.Tp Ic line
19638711SbormanEnable the
197*43085Scael.Li TELNET LINEMODE
19838711Sbormanoption, or, if the remote side does not understand the
199*43085Scael.Li LINEMODE
200*43085Scaeloption, then attempt to enter \*(Lqold-line-by-line\*(Lq mode.
201*43085Scael.Tp Cx Ic isig
202*43085Scael.Cx \&\ \&
203*43085Scael.Pq Ic \-isig
204*43085Scael.Cx
205*43085ScaelAttempt to enable (disable) the
206*43085Scael.Li TRAPSIG
207*43085Scaelmode of the
208*43085Scael.Li LINEMODE
209*43085Scaeloption.
210*43085ScaelThis requires that the
211*43085Scael.Li LINEMODE
212*43085Scaeloption be enabled.
213*43085Scael.Tp Cx Ic edit
214*43085Scael.Cx \&\ \&
215*43085Scael.Pq Ic \-edit
216*43085Scael.Cx
217*43085ScaelAttempt to enable (disable) the
218*43085Scael.Li EDIT
219*43085Scaelmode of the
220*43085Scael.Li LINEMODE
221*43085Scaeloption.
222*43085ScaelThis requires that the
223*43085Scael.Li LINEMODE
224*43085Scaeloption be enabled.
225*43085Scael.Tp Ic \&?
22638711SbormanPrints out help information for the
227*43085Scael.Ic mode
22838711Sbormancommand.
229*43085Scael.Tp
230*43085Scael.Tp Cx Ic open
231*43085Scael.Cx \&\ \&
232*43085Scael.Ar host
233*43085Scael.Cx \&\ \&
234*43085Scael.Cx [
235*43085Scael.Op Fl
236*43085Scael.Cx \&\ \&
237*43085Scael.Ar port
238*43085Scael.Cx ]
239*43085Scael.Cx
24038711SbormanOpen a connection to the named host.
24138711SbormanIf no port number
242*43085Scaelis specified,
243*43085Scael.Nm telnet
24438711Sbormanwill attempt to contact a
245*43085Scael.Li TELNET
24638711Sbormanserver at the default port.
247*43085ScaelThe host specification may be either a host name (see
248*43085Scael.Xr hosts  5  )
249*43085Scaelor an Internet address specified in the \*(Lqdot notation\*(Rq (see
250*43085Scael.Xr inet 3 ) .
25138711SbormanWhen connecting to a non-standard port,
252*43085Scael.Nm telnet
25338711Sbormanomits any automatic initiation of
254*43085Scael.Li TELNET
25538711Sbormanoptions.  When the port number is preceeded by a minus sign,
25638711Sbormanthe inital option negotiation is done.
257*43085ScaelAfter establishing a connection, the file
258*43085Scael.Pa \&.telnetrc
259*43085Scaelin the
26038711Sbormanusers home directory is opened.  Lines begining with a # are
26138711Sbormancomment lines.  Blank lines are ignored.  Lines that begin
26238711Sbormanwithout whitespace are the start of a machine entry.  The
26338711Sbormanfirst thing on the line is the name of the machine that is
26438711Sbormanbeing connected to.  The rest of the line, and successive
26538711Sbormanlines that begin with whitespace are assumed to be
266*43085Scael.Nm telnet
26738711Sbormancommands and are processed as if they had been typed
26838711Sbormanin manually to the
269*43085Scael.Nm telnet
27038711Sbormancommand prompt.
271*43085Scael.Tp Ic quit
27238711SbormanClose any open
273*43085Scael.Li TELNET
274*43085Scaelsession and exit
275*43085Scael.Nm telnet  .
27638711SbormanAn end of file (in command mode) will also close a session and exit.
277*43085Scael.Tp Cx Ic send
278*43085Scael.Cx \&\ \&
279*43085Scael.Ar arguments
280*43085Scael.Cx
28127692SminshallSends one or more special character sequences to the remote host.
28227692SminshallThe following are the arguments which may be specified
28327692Sminshall(more than one argument may be specified at a time):
284*43085Scael.Pp
285*43085Scael.Tw Ds
286*43085Scael.Tp Ic abort
28727692SminshallSends the
288*43085Scael.Li TELNET ABORT
28938711Sborman(ABORT processes)
29027692Sminshallsequence.
291*43085Scael.Tp Ic ao
29227692SminshallSends the
293*43085Scael.Li TELNET AO
29427692Sminshall(Abort Output) sequence, which should cause the remote system to flush
29527692Sminshallall output
296*43085Scael.Em from
29727692Sminshallthe remote system
298*43085Scael.Em to
29927692Sminshallthe user's terminal.
300*43085Scael.Tp Ic ayt
30127692SminshallSends the
302*43085Scael.Li TELNET AYT
30327692Sminshall(Are You There)
30427894Skarelssequence, to which the remote system may or may not choose to respond.
305*43085Scael.Tp Ic brk
30627692SminshallSends the
307*43085Scael.Li TELNET BRK
30838711Sborman(Break) sequence, which may have significance to the remote
30938711Sbormansystem.
310*43085Scael.Tp Ic ec
31138711SbormanSends the
312*43085Scael.Li TELNET EC
31327692Sminshall(Erase Character)
31427692Sminshallsequence, which should cause the remote system to erase the last character
31527692Sminshallentered.
316*43085Scael.Tp Ic el
31727692SminshallSends the
318*43085Scael.Li TELNET EL
31927692Sminshall(Erase Line)
32027692Sminshallsequence, which should cause the remote system to erase the line currently
32127692Sminshallbeing entered.
322*43085Scael.Tp Ic eof
32327692SminshallSends the
324*43085Scael.Li TELNET EOF
32538711Sborman(End Of File)
32638711Sbormansequence.
327*43085Scael.Tp Ic eor
32838711SbormanSends the
329*43085Scael.Li TELNET EOR
33038711Sborman(End of Record)
33138711Sbormansequence.
332*43085Scael.Tp Ic escape
33338711SbormanSends the current
334*43085Scael.Nm telnet
335*43085Scaelescape character (initially \*(Lq^\*(Rq).
336*43085Scael.Tp Ic ga
33738711SbormanSends the
338*43085Scael.Li TELNET GA
33927692Sminshall(Go Ahead)
34027692Sminshallsequence, which likely has no significance to the remote system.
341*43085Scael.Tp Ic getstatus
34238910SbormanIf the remote side supports the
343*43085Scael.Li TELNET STATUS
34438910Sbormancommand,
345*43085Scael.Ic getstatus
34638910Sbormanwill send the subnegotiation to request that the server send
34738910Sbormanits current option status.
348*43085Scael.Tp Ic ip
34927692SminshallSends the
350*43085Scael.Li TELNET IP
35138711Sborman(Interrupt Process) sequence, which should cause the remote
35238711Sbormansystem to abort the currently running process.
353*43085Scael.Tp Ic nop
35438711SbormanSends the
355*43085Scael.Li TELNET NOP
35627692Sminshall(No OPeration)
35727692Sminshallsequence.
358*43085Scael.Tp Ic susp
35938711SbormanSends the
360*43085Scael.Li TELNET SUSP
36138711Sborman(SUSPend process)
36238711Sbormansequence.
363*43085Scael.Tp Ic synch
36438711SbormanSends the
365*43085Scael.Li TELNET SYNCH
36638711Sbormansequence.
36738711SbormanThis sequence causes the remote system to discard all previously typed
36838711Sborman(but not yet read) input.
36938711SbormanThis sequence is sent as TCP urgent
37038711Sbormandata (and may not work if the remote system is a 4.2 BSD system -- if
371*43085Scaelit doesn't work, a lower case \*(Lqr\*(Rq may be echoed on the terminal).
372*43085Scael.Tp Ic \&?
37327692SminshallPrints out help information for the
374*43085Scael.Ic send
37527692Sminshallcommand.
376*43085Scael.Tp
377*43085Scael.Tp Cx Ic set
378*43085Scael.Cx \&\ \&
379*43085Scael.Ar argument value
380*43085Scael.Cx
381*43085Scael.Tp Cx Ic unset
382*43085Scael.Cx \&\ \&
383*43085Scael.Ar argument value
384*43085Scael.Cx
38538711SbormanThe
386*43085Scael.Ic set
38738711Sbormancommand will set any one of a number of
388*43085Scael.Nm telnet
38938711Sbormanvariables to a specific value or to TRUE.
390*43085ScaelThe special value
391*43085Scael.Ic off
392*43085Scaelturns off the function associated with
39338711Sbormanthe variable, this is equivalent to using the
394*43085Scael.Ic unset
39538711Sbormancommand.
39638711SbormanThe
397*43085Scael.Ic unset
39838711Sbormancommand will disable or set to FALSE any of the specified functions.
39927894SkarelsThe values of variables may be interrogated with the
400*43085Scael.Ic display
40127894Skarelscommand.
40238711SbormanThe variables which may be set or unset, but not toggled, are
40338711Sbormanlisted here.  In addition, any of the variables for the
404*43085Scael.Ic toggle
405*43085Scaelcommand may be explicitly set or unset using
406*43085Scaelthe
407*43085Scael.Ic set
408*43085Scaeland
409*43085Scael.Ic unset
410*43085Scaelcommands.
411*43085Scael.Tw Fl
412*43085Scael.Tp Ic echo
413*43085ScaelThis is the value (initially \*(Lq^E\*(Rq) which, when in
414*43085Scael\*(Lqline by line\*(Rq mode, toggles between doing local echoing
41527692Sminshallof entered characters (for normal processing), and suppressing
41627692Sminshallechoing of entered characters (for entering, say, a password).
417*43085Scael.Tp Ic eof
41838711SbormanIf
419*43085Scael.Nm telnet
42038711Sbormanis operating in
421*43085Scael.Li LINEMODE
422*43085Scaelor \*(Lqold line by line\*(Rq mode, entering this character
42338711Sbormanas the first character on a line will cause this character to be
42438711Sbormansent to the remote system.
42538711SbormanThe initial value of the eof character is taken to be the terminal's
426*43085Scael.Ic eof
42738711Sbormancharacter.
428*43085Scael.Tp Ic erase
42927692SminshallIf
430*43085Scael.Nm telnet
43127692Sminshallis in
432*43085Scael.Ic localchars
43327692Sminshallmode (see
434*43085Scael.Ic toggle
435*43085Scael.Ic localchars
43638711Sbormanbelow),
437*43085Scael.Sy and
43838711Sbormanif
439*43085Scael.Nm telnet
440*43085Scaelis operating in \*(Lqcharacter at a time\*(Rq mode, then when this
44127692Sminshallcharacter is typed, a
442*43085Scael.Li TELNET EC
44327692Sminshallsequence (see
444*43085Scael.Ic send
445*43085Scael.Ic ec
44627692Sminshallabove)
44738711Sbormanis sent to the remote system.
44838711SbormanThe initial value for the erase character is taken to be
44927692Sminshallthe terminal's
450*43085Scael.Ic erase
45127692Sminshallcharacter.
452*43085Scael.Tp Ic escape
45338711SbormanThis is the
454*43085Scael.Nm telnet
455*43085Scaelescape character (initially \*(Lq^[\*(Rq) which causes entry
45638711Sbormaninto
457*43085Scael.Nm telnet
45838711Sbormancommand mode (when connected to a remote system).
459*43085Scael.Tp Ic flushoutput
46027692SminshallIf
461*43085Scael.Nm telnet
46227692Sminshallis in
463*43085Scael.Ic localchars
46427692Sminshallmode (see
465*43085Scael.Ic toggle
466*43085Scael.Ic localchars
46727692Sminshallbelow)
46827692Sminshalland the
469*43085Scael.Ic flushoutput
47027692Sminshallcharacter is typed, a
471*43085Scael.Li TELNET AO
47227692Sminshallsequence (see
473*43085Scael.Ic send
474*43085Scael.Ic ao
47527692Sminshallabove)
47627692Sminshallis sent to the remote host.
47738711SbormanThe initial value for the flush character is taken to be
47827692Sminshallthe terminal's
479*43085Scael.Ic flush
48027692Sminshallcharacter.
481*43085Scael.Tp Ic interrupt
48227692SminshallIf
483*43085Scael.Nm telnet
48427692Sminshallis in
485*43085Scael.Ic localchars
48627692Sminshallmode (see
487*43085Scael.Ic toggle
488*43085Scael.Ic localchars
48927692Sminshallbelow)
49027692Sminshalland the
491*43085Scael.Ic interrupt
49227692Sminshallcharacter is typed, a
493*43085Scael.Li TELNET IP
49427692Sminshallsequence (see
495*43085Scael.Ic send
496*43085Scael.Ic ip
49727692Sminshallabove)
49827692Sminshallis sent to the remote host.
49938711SbormanThe initial value for the interrupt character is taken to be
50027692Sminshallthe terminal's
501*43085Scael.Ic intr
50227692Sminshallcharacter.
503*43085Scael.Tp Ic kill
50427692SminshallIf
505*43085Scael.Nm telnet
50627692Sminshallis in
507*43085Scael.Ic localchars
50827692Sminshallmode (see
509*43085Scael.Ic toggle
510*43085Scael.Ic localchars
51127692Sminshallbelow),
512*43085Scael.Ic and
51327692Sminshallif
514*43085Scael.Nm telnet
515*43085Scaelis operating in \*(Lqcharacter at a time\*(Rq mode, then when this
51627692Sminshallcharacter is typed, a
517*43085Scael.Li TELNET EL
51827692Sminshallsequence (see
519*43085Scael.Ic send
520*43085Scael.Ic el
52127692Sminshallabove)
52227692Sminshallis sent to the remote system.
52338711SbormanThe initial value for the kill character is taken to be
52427692Sminshallthe terminal's
525*43085Scael.Ic kill
52627692Sminshallcharacter.
527*43085Scael.Tp Ic lnext
52827692SminshallIf
529*43085Scael.Nm telnet
53038711Sbormanis operating in
531*43085Scael.Li LINEMODE
532*43085Scaelor \*(Lqold line by line\*(Lq mode, then this character is taken to
53338711Sbormanbe the terminal's
534*43085Scael.Ic lnext
53538711Sbormancharacter.
53638711SbormanThe initial value for the lnext character is taken to be
53738711Sbormanthe terminal's
538*43085Scael.Ic lnext
53938711Sbormancharacter.
540*43085Scael.Tp Ic quit
54138711SbormanIf
542*43085Scael.Nm telnet
54327692Sminshallis in
544*43085Scael.Ic localchars
54527692Sminshallmode (see
546*43085Scael.Ic toggle
547*43085Scael.Ic localchars
54838711Sbormanbelow)
54938711Sbormanand the
550*43085Scael.Ic quit
55127692Sminshallcharacter is typed, a
552*43085Scael.Li TELNET BRK
55327692Sminshallsequence (see
554*43085Scael.Ic send
555*43085Scael.Ic brk
55627692Sminshallabove)
55738711Sbormanis sent to the remote host.
55838711SbormanThe initial value for the quit character is taken to be
55938711Sbormanthe terminal's
560*43085Scael.Ic quit
56138711Sbormancharacter.
562*43085Scael.Tp Ic reprint
56338711SbormanIf
564*43085Scael.Nm telnet
56538711Sbormanis operating in
566*43085Scael.Li LINEMODE
567*43085Scaelor \*(Lqold line by line\*(Lq mode, then this character is taken to
56838711Sbormanbe the terminal's
569*43085Scael.Ic reprint
57038711Sbormancharacter.
57138711SbormanThe initial value for the reprint character is taken to be
57238711Sbormanthe terminal's
573*43085Scael.Ic reprint
57438711Sbormancharacter.
575*43085Scael.Tp Ic start
57638711SbormanIf the
577*43085Scael.Li TELNET TOGGLE-FLOW-CONTROL
57838711Sbormanoption has been enabled,
57938711Sbormanthen this character is taken to
58038711Sbormanbe the terminal's
581*43085Scael.Ic start
58238711Sbormancharacter.
58327692SminshallThe initial value for the kill character is taken to be
58427692Sminshallthe terminal's
585*43085Scael.Ic start
58627692Sminshallcharacter.
587*43085Scael.Tp Ic stop
58838711SbormanIf the
589*43085Scael.Li TELNET TOGGLE-FLOW-CONTROL
59038711Sbormanoption has been enabled,
59138711Sbormanthen this character is taken to
59238711Sbormanbe the terminal's
593*43085Scael.Ic stop
59438711Sbormancharacter.
59538711SbormanThe initial value for the kill character is taken to be
59638711Sbormanthe terminal's
597*43085Scael.Ic stop
59838711Sbormancharacter.
599*43085Scael.Tp Ic susp
60027692SminshallIf
601*43085Scael.Nm telnet
60238711Sbormanis in
603*43085Scael.Ic localchars
60438711Sbormanmode, or
605*43085Scael.Li LINEMODE
60638711Sbormanis enabled, and the
607*43085Scael.Ic suspend
60838711Sbormancharacter is typed, a
609*43085Scael.Li TELNET SUSP
61038711Sbormansequence (see
611*43085Scael.Ic send
612*43085Scael.Ic susp
61338711Sbormanabove)
61438711Sbormanis sent to the remote host.
61538711SbormanThe initial value for the suspend character is taken to be
61638711Sbormanthe terminal's
617*43085Scael.Ic suspend
61827692Sminshallcharacter.
619*43085Scael.Tp Ic tracefile
620*43085ScaelThi is the file to which the output, caused by
621*43085Scael.Ic netdata
622*43085Scaelor
623*43085Scael.Ic option
624*43085Scaeltracing being TRUE, will be written.  If it is set to
625*43085Scael.Dq Fl ,
62638711Sbormanthen tracing information will be written to standard output (the default).
627*43085Scael.Tp Ic worderase
62838711SbormanIf
629*43085Scael.Nm telnet
63038711Sbormanis operating in
631*43085Scael.Li LINEMODE
632*43085Scaelor \*(Lqold line by line\*(Lq mode, then this character is taken to
63338711Sbormanbe the terminal's
634*43085Scael.Ic worderase
63538711Sbormancharacter.
63638711SbormanThe initial value for the worderase character is taken to be
63738711Sbormanthe terminal's
638*43085Scael.Ic worderase
63938711Sbormancharacter.
640*43085Scael.Tp
641*43085Scael.Tp Cx Ic slc
642*43085Scael.Cx \&\ \&
643*43085Scael.Ar state
644*43085Scael.Cx
64538711SbormanThe
646*43085Scael.Ic slc
64738711Sbormancommand (Set Local Characters) is used to set
64838711Sbormanor change the state of the the special
649*43085Scaelcharacters when the
650*43085Scael.Li TELNET LINEMODE
651*43085Scaeloption has
65238711Sbormanbeen enabled.  Special characters are characters that get
653*43085Scaelmapped to
654*43085Scael.Li TELNET
655*43085Scaelcommands sequences (like
656*43085Scael.Ic ip
65738711Sbormanor
658*43085Scael.Ic quit  )
65938711Sbormanor line editing characters (like
660*43085Scael.Ic erase
66138711Sbormanand
662*43085Scael.Ic kill  ) .
66338711SbormanBy default, the local special characters are exported.
664*43085Scael.Tw Fl
665*43085Scael.Tp Ic export
66638711SbormanSwitch to the local defaults for the special characters.  The
66738711Sbormanlocal default characters are those of the local terminal at
66838711Sbormanthe time when
669*43085Scael.Nm telnet
67038711Sbormanwas started.
671*43085Scael.Tp Ic import
67238711SbormanSwitch to the remote defaults for the special characters.
67338711SbormanThe remote default characters are those of the remote system
674*43085Scaelat the time when the
675*43085Scael.Li TELNET
676*43085Scaelconnection was established.
677*43085Scael.Tp Ic check
67838711SbormanVerify the current settings for the current special characters.
67938711SbormanThe remote side is requested to send all the current special
68038711Sbormancharacter settings, and if there are any discrepencies with
68138711Sbormanthe local side, the local side will switch to the remote value.
682*43085Scael.Ic Ic \&?
68338711SbormanPrints out help information for the
684*43085Scael.Ic slc
68538711Sbormancommand.
686*43085Scael.Tp
687*43085Scael.Tp Ic \&?
68838711SbormanDisplays the legal
689*43085Scael.Ic set
690*43085Scael.Pq Ic unset
69138711Sbormancommands.
692*43085Scael.Tp Cx Ic toggle
693*43085Scael.Cx \&\ \&
694*43085Scael.Ar arguments ...
695*43085Scael.Cx
69627692SminshallToggle (between
69727692SminshallTRUE
69827692Sminshalland
69927692SminshallFALSE)
70027692Sminshallvarious flags that control how
701*43085Scael.Nm telnet
70227692Sminshallresponds to events.
70338711SbormanThese flags may be set explicitly to TRUE or FALSE
70438711Sbormanusing the
705*43085Scael.Ic set
70638711Sbormanand
707*43085Scael.Ic unset
70838711Sbormancommands listed above.
70927692SminshallMore than one argument may be specified.
71027894SkarelsThe state of these flags may be interrogated with the
711*43085Scael.Ic display
71227894Skarelscommand.
71327692SminshallValid arguments are:
714*43085Scael.Tw Ar
715*43085Scael.Tp Ic autoflush
71627692SminshallIf
717*43085Scael.Ic autoflush
71827692Sminshalland
719*43085Scael.Ic localchars
72027692Sminshallare both
72127692SminshallTRUE,
72227692Sminshallthen when the
723*43085Scael.Ic ao  ,
72427692Sminshallor
725*43085Scael.Ic quit
72627692Sminshallcharacters are recognized (and transformed into
727*43085Scael.Li TELNET
72827692Sminshallsequences; see
729*43085Scael.Ic set
73027692Sminshallabove for details),
731*43085Scael.Nm telnet
73227692Sminshallrefuses to display any data on the user's terminal
73327692Sminshalluntil the remote system acknowledges (via a
734*43085Scael.Li TELNET TIMING MARK
73527692Sminshalloption)
73627692Sminshallthat it has processed those
737*43085Scael.Li TELNET
73827692Sminshallsequences.
73927692SminshallThe initial value for this toggle is TRUE if the terminal user had not
74027692Sminshalldone an "stty noflsh", otherwise FALSE (see
741*43085Scael.Xr stty  1  ) .
742*43085Scael.Tp Ic autosynch
74327894SkarelsIf
744*43085Scael.Ic autosynch
74527894Skarelsand
746*43085Scael.Ic localchars
74727894Skarelsare both
74827894SkarelsTRUE,
74927894Skarelsthen when either the
750*43085Scael.Ic intr
75127894Skarelsor
752*43085Scael.Ic quit
75327894Skarelscharacters is typed (see
754*43085Scael.Ic set
75527894Skarelsabove for descriptions of the
756*43085Scael.Ic intr
75727894Skarelsand
758*43085Scael.Ic quit
75927894Skarelscharacters), the resulting
760*43085Scael.Li TELNET
76127894Skarelssequence sent is followed by the
762*43085Scael.Li TELNET SYNCH
76327894Skarelssequence.
76427894SkarelsThis procedure
765*43085Scael.Ic should
76627894Skarelscause the remote system to begin throwing away all previously
76727894Skarelstyped input until both of the
768*43085Scael.Li TELNET
76927894Skarelssequences have been read and acted upon.
77027894SkarelsThe initial value of this toggle is FALSE.
771*43085Scael.Tp Ic binary
77238711SbormanEnable or disable the
773*43085Scael.Li TELNET BINARY
77438910Sbormanoption on both input and output.
775*43085Scael.Tp Ic inbinary
77638910SbormanEnable or disable the
777*43085Scael.Li TELNET BINARY
77838910Sbormanoption on input.
779*43085Scael.Tp Ic outbinary
78038910SbormanEnable or disable the
781*43085Scael.Li TELNET BINARY
78238910Sbormanoption on output.
783*43085Scael.Tp Ic crlf
78438711SbormanIf this is TRUE, then carriage returns will be sent as <CR><LF>.
78538711SbormanIf this is FALSE, then carriage returns will be send as <CR><NUL>.
78638711SbormanThe initial value for this toggle is FALSE.
787*43085Scael.Tp Ic crmod
78827692SminshallToggle carriage return mode.
78927692SminshallWhen this mode is enabled, most carriage return characters received from
79027692Sminshallthe remote host will be mapped into a carriage return followed by
79127692Sminshalla line feed.
79227692SminshallThis mode does not affect those characters typed by the user, only
79327692Sminshallthose received from the remote host.
79427692SminshallThis mode is not very useful unless the remote host
79527692Sminshallonly sends carriage return, but never line feed.
79627692SminshallThe initial value for this toggle is FALSE.
797*43085Scael.Tp Ic debug
79827692SminshallToggles socket level debugging (useful only to the
799*43085Scael.Ic super user  ) .
80027692SminshallThe initial value for this toggle is FALSE.
801*43085Scael.Tp Ic localchars
80238711SbormanIf this is
80338711SbormanTRUE,
80438711Sbormanthen the
805*43085Scael.Ic flush  ,
806*43085Scael.Ic quit  ,
80738711Sbormanand
808*43085Scael.Ic kill
80938711Sbormancharacters (see
810*43085Scael.Ic set
81138711Sbormanabove) are recognized locally, and transformed into (hopefully) appropriate
812*43085Scael.Li TELNET
81338711Sbormancontrol sequences
81438711Sborman(respectively
815*43085Scael.Ic ao  ,
816*43085Scael.Ic brk  ,
81738711Sbormanand
818*43085Scael.Ic el  ;
81938711Sbormansee
820*43085Scael.Ic send
82138711Sbormanabove).
822*43085ScaelThe initial value for this toggle is TRUE in \*(Lqold line by line\*(Rq mode,
823*43085Scaeland FALSE in \*(Lqcharacter at a time\*(Rq mode.
82438711SbormanWhen the
825*43085Scael.Li LINEMODE
82638711Sbormanoption is enabled, the value of
827*43085Scael.Ic localchars
82838711Sbormanis ignored, and assumed to always be TRUE.
82938711SbormanIf
830*43085Scael.Li LINEMODE
83138711Sbormanhas ever been enabled, then
832*43085Scael.Ic quit
83338711Sbormanis sent as
834*43085Scael.Ic abort  ,
83538711Sbormanand
836*43085Scael.Ic eof and
83738711Sborman.B suspend
83838711Sbormanare sent as
839*43085Scael.Ic eof and
84038711Sbormansee
841*43085Scael.Ic send
84238711Sbormanabove).
843*43085Scael.Tp Ic netdata
84438711SbormanToggles the display of all network data (in hexadecimal format).
84538711SbormanThe initial value for this toggle is FALSE.
846*43085Scael.Tp Ic options
84727692SminshallToggles the display of some internal
848*43085Scael.Nm telnet
84927692Sminshallprotocol processing (having to do with
850*43085Scael.Li TELNET
85127692Sminshalloptions).
85227692SminshallThe initial value for this toggle is FALSE.
853*43085Scael.Tp Ic prettydump
85438711SbormanWhen the
855*43085Scael.Ic netdata
85638711Sbormantoggle is enabled, if
857*43085Scael.Ic prettydump
85838711Sbormanis enabled the output from the
859*43085Scael.Ic netdata
86038711Sbormancommand will be formated in a more user readable format.
86138711SbormanSpaces are put between each character in the output, and the
86238711Sbormanbegining of any
863*43085Scael.Li TELNET
86438711Sbormanescape sequence is preceeded by a '*' to aid in locating them.
865*43085Scael.Tp Ic \&?
86627692SminshallDisplays the legal
867*43085Scael.Ic toggle
86827692Sminshallcommands.
869*43085Scael.Tp
870*43085Scael.Tp Ic z
87138711SbormanSuspend
872*43085Scael.Nm telnet  .
873*43085ScaelThis command only works when the user is using the
874*43085Scael.Xr csh  1  .
875*43085Scael.Tp Cx Ic \&!
876*43085Scael.Cx \&\ \&
877*43085Scael.Op Ar command
878*43085Scael.Cx
87938711SbormanExecute a single command in a subshell on the local
880*43085Scaelsystem.  If
881*43085Scael.Ic command
882*43085Scaelis ommitted, then an interactive
88338711Sbormansubshell is invoked.
884*43085Scael.Tp Ic status
885*43085ScaelShow the current status of
886*43085Scael.Nm telnet  .
88738711SbormanThis includes the peer one is connected to, as well
88838711Sbormanas the current mode.
889*43085Scael.Tp Cx Ic \&?
890*43085Scael.Cx \&\ \&
891*43085Scael.Op Ar command
892*43085Scael.Cx
89338711SbormanGet help.  With no arguments,
894*43085Scael.Nm telnet
89538711Sbormanprints a help summary.
896*43085ScaelIf a command is specified,
897*43085Scael.Nm telnet
89838711Sbormanwill print the help information for just that command.
899*43085Scael.Sh ENVIRONMENT
900*43085Scael.Nm Telnet
901*43085Scaeluses the
902*43085Scael.Ev HOME ,
903*43085Scael.Ev SHELL
904*43085Scaeland
905*43085Scael.Ev TERM
906*43085Scaelenvironent variables.
907*43085Scael.Sh FILES
908*43085Scael.Dw ~/.telnetrc
909*43085Scael.Di L
910*43085Scael.Dp Pa ~/.telnetrc
911*43085Scaeluser customized telnet startup values
912*43085Scael.Dp
913*43085Scael.Sh HISTORY
914*43085Scael.Nm Telnet
915*43085Scaelappeared in 4.2 BSD.
916*43085Scael.Sh NOTES
917*43085Scael.Pp
91827692SminshallOn some remote systems, echo has to be turned off manually when in
919*43085Scael\*(Lqold line by line\*(Rq mode.
920*43085Scael.Pp
921*43085ScaelIn \*(Lqold line by line\*(Rq mode or
922*43085Scael.Li LINEMODE
923*43085Scaelthe terminal's
924*43085Scael.Ic eof
92527692Sminshallcharacter is only recognized (and sent to the remote system)
92627692Sminshallwhen it is the first character on a line.
927