xref: /csrg-svn/usr.bin/telnet/telnet.1 (revision 49965)
143085Scael.\" Copyright (c) 1983, 1990 The Regents of the University of California.
235656Sbostic.\" All rights reserved.
319759Smckusick.\"
443085Scael.\" %sccs.include.redist.man%
519759Smckusick.\"
6*49965Ssellgren.\"     @(#)telnet.1	6.15 (Berkeley) 06/03/91
735656Sbostic.\"
847389Scael.Vx
947389Scael.Vx
1043085Scael.Dd
1143085Scael.Dt TELNET 1
1243085Scael.Os BSD 4.2
1343085Scael.Sh NAME
1443085Scael.Nm telnet
1543085Scael.Nd user interface to the
1643085Scael.Li TELNET
1743085Scaelprotocol
1843085Scael.Sh SYNOPSIS
1943085Scael.Nm telnet
2043085Scael.Op Fl d
2145010Skarels.Op Fl a
2243085Scael.Op Fl n Ar tracefile
2345010Skarels.Op Fl e Ar escapechar
2445013Scael.Ob
2545010Skarels.Op Fl l Ar user
2645013Scael.Ar host
2745013Scael.Op port
2845013Scael.Oe
2943085Scael.Sh DESCRIPTION
3038711SbormanThe
3143085Scael.Nm telnet
3238711Sbormancommand
3343085Scaelis used to communicate with another host using the
3443085Scael.Li TELNET
3543085Scaelprotocol.
3643085ScaelIf
3743085Scael.Nm telnet
3838711Sbormanis invoked without the
3943085Scael.Ar host
4038711Sbormanargument, it enters command mode,
4143085Scaelindicated by its prompt
4243085Scael.Pq Nm telnet\&> .
4319759SmckusickIn this mode, it accepts and executes the commands listed below.
4419759SmckusickIf it is invoked with arguments, it performs an
4543085Scael.Ic open
4643085Scaelcommand with those arguments.
4743085Scael.Pp
4843085ScaelOptions:
4943085Scael.Tw Fl
5043085Scael.Tp Fl d
5143085ScaelSets the initial value of the
5243085Scael.Ic debug
5343085Scaeltoggle to
5443085Scael.Li TRUE
5545010Skarels.Tp Fl a
5645010SkarelsAttempt automatic login.
5745010SkarelsCurrently, this sends the user name via the USER variable
5845010Skarelsof the ENVIRON option if supported by the remote system.
5945010SkarelsThe name used is that of the current user as returned by
6045010Skarels.Xr getlogin 2
6145010Skarelsif it agrees with the current user ID,
6245010Skarelsotherwise it is the name associated with the user ID.
6343085Scael.Tp Cx Fl n
6443085Scael.Cx \&\ \&
6543085Scael.Ar tracefile
6643085Scael.Cx
6743085ScaelOpens
6843085Scael.Ar tracefile
6943085Scaelfor recording trace information.
7043085ScaelSee the
7143085Scael.Ic set tracefile
7243085Scaelcommand below.
7345010Skarels.Tp Cx Fl l
7445010Skarels.Cx \&\ \&
7545010Skarels.Ar user
7645010Skarels.Cx
7745010SkarelsWhen connecting to the remote system, if the remote system
7845010Skarelsunderstands the ENVIRON option, then
7945010Skarels.Ar user
8045010Skarelswill be sent to the remote system as the value for the variable USER.
8145010SkarelsThis option implies the
8245010Skarels.Fl a
8345010Skarelsoption.
8445010SkarelsThis option may also be used with the
8545010Skarels.Ic open
8645010Skarelscommand.
8745010Skarels.Tp Cx Fl e
8845010Skarels.Cx \&\ \&
8945010Skarels.Ar escape char
9045010Skarels.Cx
9145010SkarelsSets the initial
9245010Skarels.Nm
9345010Skarels.B telnet
9445010Skarelsescape character to
9545010Skarels.Ar escape char.
9645010SkarelsIf
9745010Skarels.Ar escape char
9845010Skarelsis ommitted, then
9945010Skarelsthere will be no escape character.
10043085Scael.Tp Ar host
10143085ScaelIndicates the official name, an alias, or the Internet address
10243085Scaelof a remote host.
10343085Scael.Tp Ar port
10443085ScaelIndicates a port number (address of an application).  If a number is
10543085Scaelnot specified, the default
10643085Scael.Nm telnet
10743085Scaelport is used.
10843085Scael.Tp
10943085Scael.Pp
11019759SmckusickOnce a connection has been opened,
11143085Scael.Nm telnet
11238711Sbormanwill attempt to enable the
11343085Scael.Li TELNET LINEMODE
11438711Sbormanoption.
11538711SbormanIf this fails, then
11643085Scael.Nm telnet
11738711Sbormanwill revert to one of two input modes:
11843085Scaeleither \*(Lqcharacter at a time\*(Rq
11943085Scaelor \*(Lqold line by line\*(Rq
12027692Sminshalldepending on what the remote system supports.
12143085Scael.Pp
12243085ScaelWhen
12343085Scael.Li LINEMODE
12443085Scaelis enabled, character processing is done on the
12538711Sbormanlocal system, under the control of the remote system.  When input
12638711Sbormanediting or character echoing is to be disabled, the remote system
12738711Sbormanwill relay that information.  The remote system will also relay
12838711Sbormanchanges to any special characters that happen on the remote
12938711Sbormansystem, so that they can take effect on the local system.
13043085Scael.Pp
13143085ScaelIn \*(Lqcharacter at a time\*(Rq mode, most
13227692Sminshalltext typed is immediately sent to the remote host for processing.
13343085Scael.Pp
13443085ScaelIn \*(Lqold line by line\*(Rq mode, all text is echoed locally,
13527692Sminshalland (normally) only completed lines are sent to the remote host.
13643085ScaelThe \*(Lqlocal echo character\*(Rq (initially \*(Lq^E\*(Rq) may be used
13727692Sminshallto turn off and on the local echo
13827692Sminshall(this would mostly be used to enter passwords
13927692Sminshallwithout the password being echoed).
14043085Scael.Pp
14143085ScaelIf the
14243085Scael.Li LINEMODE
14343085Scaeloption is enabled, or if the
14443085Scael.Ic localchars
14543085Scaeltoggle is TRUE (the default for \*(Lqold line by line\*(Lq; see below),
14627692Sminshallthe user's
14743085Scael.Ic quit  ,
14843085Scael.Ic intr ,
14927692Sminshalland
15043085Scael.Ic flush
15127692Sminshallcharacters are trapped locally, and sent as
15243085Scael.Li TELNET
15327692Sminshallprotocol sequences to the remote side.
15443085ScaelIf
15543085Scael.Li LINEMODE
15643085Scaelhas ever been enabled, then the user's
15743085Scael.Ic susp
15838711Sbormanand
15943085Scael.Ic eof
16038711Sbormanare also sent as
16143085Scael.Li TELNET
16238711Sbormanprotocol sequences,
16338711Sbormanand
16443085Scael.Ic quit
16543085Scaelis sent as a
16643085Scael.Li TELNET ABORT
16743085Scaelinstead of
16843085Scael.Li BREAK
16927692SminshallThere are options (see
17043085Scael.Ic toggle
17143085Scael.Ic autoflush
17227692Sminshalland
17343085Scael.Ic toggle
17443085Scael.Ic autosynch
17527692Sminshallbelow)
17627692Sminshallwhich cause this action to flush subsequent output to the terminal
17727692Sminshall(until the remote host acknowledges the
17843085Scael.Li TELNET
17927692Sminshallsequence) and flush previous terminal input
18027692Sminshall(in the case of
18143085Scael.Ic quit
18227692Sminshalland
18343085Scael.Ic intr  ) .
18443085Scael.Pp
18527692SminshallWhile connected to a remote host,
18643085Scael.Nm telnet
18727692Sminshallcommand mode may be entered by typing the
18843085Scael.Nm telnet
189*49965Ssellgren\*(Lqescape character\*(Rq (initially \*(Lq^]\*(Rq).
19019759SmckusickWhen in command mode, the normal terminal editing conventions are available.
19143085Scael.Pp
192*49965SsellgrenThe following
193*49965Ssellgren.Nm telnet
19443085Scaelcommands are available.
19527692SminshallOnly enough of each command to uniquely identify it need be typed
19627692Sminshall(this is also true for arguments to the
19743085Scael.Ic mode  ,
19843085Scael.Ic set ,
19943085Scael.Ic toggle  ,
20043085Scael.Ic unset ,
20143085Scael.Ic slc  ,
20245010Skarels.Ic environ ,
20327692Sminshalland
20443085Scael.Ic display
20527692Sminshallcommands).
20643085Scael.Pp
20743085Scael.Tw Ic
20843085Scael.Tp Ic close
20927692SminshallClose a
21043085Scael.Li TELNET
21127692Sminshallsession and return to command mode.
21243085Scael.Tp Cx Ic display
21343085Scael.Cx \&\ \&
21443085Scael.Ar argument ...
21543085Scael.Cx
21638711SbormanDisplays all, or some, of the
21743085Scael.Ic set
21838711Sbormanand
21943085Scael.Ic toggle
22038711Sbormanvalues (see below).
22143085Scael.Tp Cx Ic mode
22243085Scael.Cx \&\ \&
22343085Scael.Ar type
22443085Scael.Cx
22543085Scael.Ar Type
22638711Sbormanis one of several options, depending on the state of the
22743085Scael.Li TELNET
22838711Sbormansession.
22927692SminshallThe remote host is asked for permission to go into the requested mode.
23027692SminshallIf the remote host is capable of entering that mode, the requested
23127692Sminshallmode will be entered.
23243085Scael.Tw Ar
23343085Scael.Tp Ic character
23438711SbormanDisable the
23543085Scael.Li TELNET LINEMODE
23638711Sbormanoption, or, if the remote side does not understand the
23743085Scael.Li LINEMODE
23843085Scaeloption, then enter \*(Lqcharacter at a time\*(Lq mode.
23943085Scael.Tp Ic line
24038711SbormanEnable the
24143085Scael.Li TELNET LINEMODE
24238711Sbormanoption, or, if the remote side does not understand the
24343085Scael.Li LINEMODE
24443085Scaeloption, then attempt to enter \*(Lqold-line-by-line\*(Lq mode.
24543085Scael.Tp Cx Ic isig
24643085Scael.Cx \&\ \&
24743085Scael.Pq Ic \-isig
24843085Scael.Cx
24943085ScaelAttempt to enable (disable) the
25043085Scael.Li TRAPSIG
25143085Scaelmode of the
25243085Scael.Li LINEMODE
25343085Scaeloption.
25443085ScaelThis requires that the
25543085Scael.Li LINEMODE
25643085Scaeloption be enabled.
25743085Scael.Tp Cx Ic edit
25843085Scael.Cx \&\ \&
25943085Scael.Pq Ic \-edit
26043085Scael.Cx
26143085ScaelAttempt to enable (disable) the
26243085Scael.Li EDIT
26343085Scaelmode of the
26443085Scael.Li LINEMODE
26543085Scaeloption.
26643085ScaelThis requires that the
26743085Scael.Li LINEMODE
26843085Scaeloption be enabled.
26945010Skarels.Tp Cx Ic softtabs
27045010Skarels.Cx \&\ \&
27145010Skarels.Pq Ic \-softtabs
27245010Skarels.Cx
27345010SkarelsAttempt to enable (disable) the
27445010Skarels.Li SOFT_TAB
27545010Skarelsmode of the
27645010Skarels.Li LINEMODE
27745010Skarelsoption.
27845010SkarelsThis requires that the
27945010Skarels.Li LINEMODE
28045010Skarelsoption be enabled.
28145010Skarels.Tp Cx Ic litecho
28245010Skarels.Cx \&\ \&
28345010Skarels.Pq Ic \-litecho
28445010Skarels.Cx
28545010SkarelsAttempt to enable (disable) the
28645010Skarels.Li LIT_ECHO
28745010Skarelsmode of the
28845010Skarels.Li LINEMODE
28945010Skarelsoption.
29045010SkarelsThis requires that the
29145010Skarels.Li LINEMODE
29245010Skarelsoption be enabled.
29343085Scael.Tp Ic \&?
29438711SbormanPrints out help information for the
29543085Scael.Ic mode
29638711Sbormancommand.
29743085Scael.Tp
29843085Scael.Tp Cx Ic open
29943085Scael.Cx \&\ \&
30043085Scael.Ar host
30143085Scael.Cx \&\ \&
30243085Scael.Cx [
30345010Skarels.Op Fl l
30445010Skarels.Cx \&\ \&
30545010Skarels.Ar user
30645010Skarels.Cx ]
30745010Skarels.Cx [
30843085Scael.Op Fl
30943085Scael.Cx \&\ \&
31043085Scael.Ar port
31143085Scael.Cx ]
31243085Scael.Cx
31338711SbormanOpen a connection to the named host.
31438711SbormanIf no port number
31543085Scaelis specified,
31643085Scael.Nm telnet
31738711Sbormanwill attempt to contact a
31843085Scael.Li TELNET
31938711Sbormanserver at the default port.
32043085ScaelThe host specification may be either a host name (see
32143085Scael.Xr hosts  5  )
32243085Scaelor an Internet address specified in the \*(Lqdot notation\*(Rq (see
32343085Scael.Xr inet 3 ) .
32445010SkarelsThe
32545010Skarels.Op Fl l
32645010Skarelsoption may be used to specify the user name
32745010Skarelsto be passed to the remote system via the
32845010Skarels.Li ENVIRON
32945010Skarelsoption.
33038711SbormanWhen connecting to a non-standard port,
33143085Scael.Nm telnet
33238711Sbormanomits any automatic initiation of
33343085Scael.Li TELNET
33438711Sbormanoptions.  When the port number is preceeded by a minus sign,
33538711Sbormanthe inital option negotiation is done.
33643085ScaelAfter establishing a connection, the file
33743085Scael.Pa \&.telnetrc
33843085Scaelin the
33938711Sbormanusers home directory is opened.  Lines begining with a # are
34038711Sbormancomment lines.  Blank lines are ignored.  Lines that begin
34138711Sbormanwithout whitespace are the start of a machine entry.  The
34238711Sbormanfirst thing on the line is the name of the machine that is
34338711Sbormanbeing connected to.  The rest of the line, and successive
34438711Sbormanlines that begin with whitespace are assumed to be
34543085Scael.Nm telnet
34638711Sbormancommands and are processed as if they had been typed
34738711Sbormanin manually to the
34843085Scael.Nm telnet
34938711Sbormancommand prompt.
35043085Scael.Tp Ic quit
35138711SbormanClose any open
35243085Scael.Li TELNET
35343085Scaelsession and exit
35443085Scael.Nm telnet  .
35538711SbormanAn end of file (in command mode) will also close a session and exit.
35643085Scael.Tp Cx Ic send
35743085Scael.Cx \&\ \&
35843085Scael.Ar arguments
35943085Scael.Cx
36027692SminshallSends one or more special character sequences to the remote host.
36127692SminshallThe following are the arguments which may be specified
36227692Sminshall(more than one argument may be specified at a time):
36343085Scael.Pp
36443085Scael.Tw Ds
36543085Scael.Tp Ic abort
36627692SminshallSends the
36743085Scael.Li TELNET ABORT
36838711Sborman(ABORT processes)
36927692Sminshallsequence.
37043085Scael.Tp Ic ao
37127692SminshallSends the
37243085Scael.Li TELNET AO
37327692Sminshall(Abort Output) sequence, which should cause the remote system to flush
37427692Sminshallall output
37543085Scael.Em from
37627692Sminshallthe remote system
37743085Scael.Em to
37827692Sminshallthe user's terminal.
37943085Scael.Tp Ic ayt
38027692SminshallSends the
38143085Scael.Li TELNET AYT
38227692Sminshall(Are You There)
38327894Skarelssequence, to which the remote system may or may not choose to respond.
38443085Scael.Tp Ic brk
38527692SminshallSends the
38643085Scael.Li TELNET BRK
38738711Sborman(Break) sequence, which may have significance to the remote
38838711Sbormansystem.
38943085Scael.Tp Ic ec
39038711SbormanSends the
39143085Scael.Li TELNET EC
39227692Sminshall(Erase Character)
39327692Sminshallsequence, which should cause the remote system to erase the last character
39427692Sminshallentered.
39543085Scael.Tp Ic el
39627692SminshallSends the
39743085Scael.Li TELNET EL
39827692Sminshall(Erase Line)
39927692Sminshallsequence, which should cause the remote system to erase the line currently
40027692Sminshallbeing entered.
40143085Scael.Tp Ic eof
40227692SminshallSends the
40343085Scael.Li TELNET EOF
40438711Sborman(End Of File)
40538711Sbormansequence.
40643085Scael.Tp Ic eor
40738711SbormanSends the
40843085Scael.Li TELNET EOR
40938711Sborman(End of Record)
41038711Sbormansequence.
41143085Scael.Tp Ic escape
41238711SbormanSends the current
41343085Scael.Nm telnet
41443085Scaelescape character (initially \*(Lq^\*(Rq).
41543085Scael.Tp Ic ga
41638711SbormanSends the
41743085Scael.Li TELNET GA
41827692Sminshall(Go Ahead)
41927692Sminshallsequence, which likely has no significance to the remote system.
42043085Scael.Tp Ic getstatus
42138910SbormanIf the remote side supports the
42243085Scael.Li TELNET STATUS
42338910Sbormancommand,
42443085Scael.Ic getstatus
42538910Sbormanwill send the subnegotiation to request that the server send
42638910Sbormanits current option status.
42743085Scael.Tp Ic ip
42827692SminshallSends the
42943085Scael.Li TELNET IP
43038711Sborman(Interrupt Process) sequence, which should cause the remote
43138711Sbormansystem to abort the currently running process.
43243085Scael.Tp Ic nop
43338711SbormanSends the
43443085Scael.Li TELNET NOP
43527692Sminshall(No OPeration)
43627692Sminshallsequence.
43743085Scael.Tp Ic susp
43838711SbormanSends the
43943085Scael.Li TELNET SUSP
44038711Sborman(SUSPend process)
44138711Sbormansequence.
44243085Scael.Tp Ic synch
44338711SbormanSends the
44443085Scael.Li TELNET SYNCH
44538711Sbormansequence.
44638711SbormanThis sequence causes the remote system to discard all previously typed
44738711Sborman(but not yet read) input.
44838711SbormanThis sequence is sent as TCP urgent
44938711Sbormandata (and may not work if the remote system is a 4.2 BSD system -- if
45043085Scaelit doesn't work, a lower case \*(Lqr\*(Rq may be echoed on the terminal).
45143085Scael.Tp Ic \&?
45227692SminshallPrints out help information for the
45343085Scael.Ic send
45427692Sminshallcommand.
45543085Scael.Tp
45643085Scael.Tp Cx Ic set
45743085Scael.Cx \&\ \&
45843085Scael.Ar argument value
45943085Scael.Cx
46043085Scael.Tp Cx Ic unset
46143085Scael.Cx \&\ \&
46243085Scael.Ar argument value
46343085Scael.Cx
46438711SbormanThe
46543085Scael.Ic set
46638711Sbormancommand will set any one of a number of
46743085Scael.Nm telnet
46838711Sbormanvariables to a specific value or to TRUE.
46943085ScaelThe special value
47043085Scael.Ic off
47143085Scaelturns off the function associated with
47238711Sbormanthe variable, this is equivalent to using the
47343085Scael.Ic unset
47438711Sbormancommand.
47538711SbormanThe
47643085Scael.Ic unset
47738711Sbormancommand will disable or set to FALSE any of the specified functions.
47827894SkarelsThe values of variables may be interrogated with the
47943085Scael.Ic display
48027894Skarelscommand.
48138711SbormanThe variables which may be set or unset, but not toggled, are
48238711Sbormanlisted here.  In addition, any of the variables for the
48343085Scael.Ic toggle
48443085Scaelcommand may be explicitly set or unset using
48543085Scaelthe
48643085Scael.Ic set
48743085Scaeland
48843085Scael.Ic unset
48943085Scaelcommands.
49043085Scael.Tw Fl
49143085Scael.Tp Ic echo
49243085ScaelThis is the value (initially \*(Lq^E\*(Rq) which, when in
49343085Scael\*(Lqline by line\*(Rq mode, toggles between doing local echoing
49427692Sminshallof entered characters (for normal processing), and suppressing
49527692Sminshallechoing of entered characters (for entering, say, a password).
49643085Scael.Tp Ic eof
49738711SbormanIf
49843085Scael.Nm telnet
49938711Sbormanis operating in
50043085Scael.Li LINEMODE
50143085Scaelor \*(Lqold line by line\*(Rq mode, entering this character
50238711Sbormanas the first character on a line will cause this character to be
50338711Sbormansent to the remote system.
50438711SbormanThe initial value of the eof character is taken to be the terminal's
50543085Scael.Ic eof
50638711Sbormancharacter.
50743085Scael.Tp Ic erase
50827692SminshallIf
50943085Scael.Nm telnet
51027692Sminshallis in
51143085Scael.Ic localchars
51227692Sminshallmode (see
51343085Scael.Ic toggle
51443085Scael.Ic localchars
51538711Sbormanbelow),
51643085Scael.Sy and
51738711Sbormanif
51843085Scael.Nm telnet
51943085Scaelis operating in \*(Lqcharacter at a time\*(Rq mode, then when this
52027692Sminshallcharacter is typed, a
52143085Scael.Li TELNET EC
52227692Sminshallsequence (see
52343085Scael.Ic send
52443085Scael.Ic ec
52527692Sminshallabove)
52638711Sbormanis sent to the remote system.
52738711SbormanThe initial value for the erase character is taken to be
52827692Sminshallthe terminal's
52943085Scael.Ic erase
53027692Sminshallcharacter.
53143085Scael.Tp Ic escape
53238711SbormanThis is the
53343085Scael.Nm telnet
53443085Scaelescape character (initially \*(Lq^[\*(Rq) which causes entry
53538711Sbormaninto
53643085Scael.Nm telnet
53738711Sbormancommand mode (when connected to a remote system).
53843085Scael.Tp Ic flushoutput
53927692SminshallIf
54043085Scael.Nm telnet
54127692Sminshallis in
54243085Scael.Ic localchars
54327692Sminshallmode (see
54443085Scael.Ic toggle
54543085Scael.Ic localchars
54627692Sminshallbelow)
54727692Sminshalland the
54843085Scael.Ic flushoutput
54927692Sminshallcharacter is typed, a
55043085Scael.Li TELNET AO
55127692Sminshallsequence (see
55243085Scael.Ic send
55343085Scael.Ic ao
55427692Sminshallabove)
55527692Sminshallis sent to the remote host.
55638711SbormanThe initial value for the flush character is taken to be
55727692Sminshallthe terminal's
55843085Scael.Ic flush
55927692Sminshallcharacter.
56043085Scael.Tp Ic interrupt
56127692SminshallIf
56243085Scael.Nm telnet
56327692Sminshallis in
56443085Scael.Ic localchars
56527692Sminshallmode (see
56643085Scael.Ic toggle
56743085Scael.Ic localchars
56827692Sminshallbelow)
56927692Sminshalland the
57043085Scael.Ic interrupt
57127692Sminshallcharacter is typed, a
57243085Scael.Li TELNET IP
57327692Sminshallsequence (see
57443085Scael.Ic send
57543085Scael.Ic ip
57627692Sminshallabove)
57727692Sminshallis sent to the remote host.
57838711SbormanThe initial value for the interrupt character is taken to be
57927692Sminshallthe terminal's
58043085Scael.Ic intr
58127692Sminshallcharacter.
58243085Scael.Tp Ic kill
58327692SminshallIf
58443085Scael.Nm telnet
58527692Sminshallis in
58643085Scael.Ic localchars
58727692Sminshallmode (see
58843085Scael.Ic toggle
58943085Scael.Ic localchars
59027692Sminshallbelow),
59143085Scael.Ic and
59227692Sminshallif
59343085Scael.Nm telnet
59443085Scaelis operating in \*(Lqcharacter at a time\*(Rq mode, then when this
59527692Sminshallcharacter is typed, a
59643085Scael.Li TELNET EL
59727692Sminshallsequence (see
59843085Scael.Ic send
59943085Scael.Ic el
60027692Sminshallabove)
60127692Sminshallis sent to the remote system.
60238711SbormanThe initial value for the kill character is taken to be
60327692Sminshallthe terminal's
60443085Scael.Ic kill
60527692Sminshallcharacter.
60643085Scael.Tp Ic lnext
60727692SminshallIf
60843085Scael.Nm telnet
60938711Sbormanis operating in
61043085Scael.Li LINEMODE
61143085Scaelor \*(Lqold line by line\*(Lq mode, then this character is taken to
61238711Sbormanbe the terminal's
61343085Scael.Ic lnext
61438711Sbormancharacter.
61538711SbormanThe initial value for the lnext character is taken to be
61638711Sbormanthe terminal's
61743085Scael.Ic lnext
61838711Sbormancharacter.
61943085Scael.Tp Ic quit
62038711SbormanIf
62143085Scael.Nm telnet
62227692Sminshallis in
62343085Scael.Ic localchars
62427692Sminshallmode (see
62543085Scael.Ic toggle
62643085Scael.Ic localchars
62738711Sbormanbelow)
62838711Sbormanand the
62943085Scael.Ic quit
63027692Sminshallcharacter is typed, a
63143085Scael.Li TELNET BRK
63227692Sminshallsequence (see
63343085Scael.Ic send
63443085Scael.Ic brk
63527692Sminshallabove)
63638711Sbormanis sent to the remote host.
63738711SbormanThe initial value for the quit character is taken to be
63838711Sbormanthe terminal's
63943085Scael.Ic quit
64038711Sbormancharacter.
64143085Scael.Tp Ic reprint
64238711SbormanIf
64343085Scael.Nm telnet
64438711Sbormanis operating in
64543085Scael.Li LINEMODE
64643085Scaelor \*(Lqold line by line\*(Lq mode, then this character is taken to
64738711Sbormanbe the terminal's
64843085Scael.Ic reprint
64938711Sbormancharacter.
65038711SbormanThe initial value for the reprint character is taken to be
65138711Sbormanthe terminal's
65243085Scael.Ic reprint
65338711Sbormancharacter.
65443085Scael.Tp Ic start
65538711SbormanIf the
65643085Scael.Li TELNET TOGGLE-FLOW-CONTROL
65738711Sbormanoption has been enabled,
65838711Sbormanthen this character is taken to
65938711Sbormanbe the terminal's
66043085Scael.Ic start
66138711Sbormancharacter.
66227692SminshallThe initial value for the kill character is taken to be
66327692Sminshallthe terminal's
66443085Scael.Ic start
66527692Sminshallcharacter.
66643085Scael.Tp Ic stop
66738711SbormanIf the
66843085Scael.Li TELNET TOGGLE-FLOW-CONTROL
66938711Sbormanoption has been enabled,
67038711Sbormanthen this character is taken to
67138711Sbormanbe the terminal's
67243085Scael.Ic stop
67338711Sbormancharacter.
67438711SbormanThe initial value for the kill character is taken to be
67538711Sbormanthe terminal's
67643085Scael.Ic stop
67738711Sbormancharacter.
67843085Scael.Tp Ic susp
67927692SminshallIf
68043085Scael.Nm telnet
68138711Sbormanis in
68243085Scael.Ic localchars
68338711Sbormanmode, or
68443085Scael.Li LINEMODE
68538711Sbormanis enabled, and the
68643085Scael.Ic suspend
68738711Sbormancharacter is typed, a
68843085Scael.Li TELNET SUSP
68938711Sbormansequence (see
69043085Scael.Ic send
69143085Scael.Ic susp
69238711Sbormanabove)
69338711Sbormanis sent to the remote host.
69438711SbormanThe initial value for the suspend character is taken to be
69538711Sbormanthe terminal's
69643085Scael.Ic suspend
69727692Sminshallcharacter.
69843085Scael.Tp Ic tracefile
69943085ScaelThi is the file to which the output, caused by
70043085Scael.Ic netdata
70143085Scaelor
70243085Scael.Ic option
70343085Scaeltracing being TRUE, will be written.  If it is set to
70443085Scael.Dq Fl ,
70538711Sbormanthen tracing information will be written to standard output (the default).
70643085Scael.Tp Ic worderase
70738711SbormanIf
70843085Scael.Nm telnet
70938711Sbormanis operating in
71043085Scael.Li LINEMODE
71143085Scaelor \*(Lqold line by line\*(Lq mode, then this character is taken to
71238711Sbormanbe the terminal's
71343085Scael.Ic worderase
71438711Sbormancharacter.
71538711SbormanThe initial value for the worderase character is taken to be
71638711Sbormanthe terminal's
71743085Scael.Ic worderase
71838711Sbormancharacter.
71945010Skarels.Tp Ic \&?
72045010SkarelsDisplays the legal
72145010Skarels.Ic set
72245010Skarels.Pq Ic unset
72345010Skarelscommands.
72443085Scael.Tp
72543085Scael.Tp Cx Ic slc
72643085Scael.Cx \&\ \&
72743085Scael.Ar state
72843085Scael.Cx
72938711SbormanThe
73043085Scael.Ic slc
73138711Sbormancommand (Set Local Characters) is used to set
73238711Sbormanor change the state of the the special
73343085Scaelcharacters when the
73443085Scael.Li TELNET LINEMODE
73543085Scaeloption has
73638711Sbormanbeen enabled.  Special characters are characters that get
73743085Scaelmapped to
73843085Scael.Li TELNET
73943085Scaelcommands sequences (like
74043085Scael.Ic ip
74138711Sbormanor
74243085Scael.Ic quit  )
74338711Sbormanor line editing characters (like
74443085Scael.Ic erase
74538711Sbormanand
74643085Scael.Ic kill  ) .
74738711SbormanBy default, the local special characters are exported.
74843085Scael.Tw Fl
74943085Scael.Tp Ic export
75038711SbormanSwitch to the local defaults for the special characters.  The
75138711Sbormanlocal default characters are those of the local terminal at
75238711Sbormanthe time when
75343085Scael.Nm telnet
75438711Sbormanwas started.
75543085Scael.Tp Ic import
75638711SbormanSwitch to the remote defaults for the special characters.
75738711SbormanThe remote default characters are those of the remote system
75843085Scaelat the time when the
75943085Scael.Li TELNET
76043085Scaelconnection was established.
76143085Scael.Tp Ic check
76238711SbormanVerify the current settings for the current special characters.
76338711SbormanThe remote side is requested to send all the current special
76438711Sbormancharacter settings, and if there are any discrepencies with
76538711Sbormanthe local side, the local side will switch to the remote value.
76645010Skarels.Tp Ic \&?
76738711SbormanPrints out help information for the
76843085Scael.Ic slc
76938711Sbormancommand.
77043085Scael.Tp
77145010Skarels.Tp Cx Ic environ
77245010Skarels.Cx \&\ \&
77345010Skarels.Ar arguments...
77445010Skarels.Cx
77545010SkarelsThe
77645010Skarels.Ic environ
77745010Skarelscommand is used to manipulate the
77845010Skarelsthe variables that my be sent through the
77945010Skarels.Li TELNET ENVIRON
78045010Skarelsoption.
78145010SkarelsThe initial set of variables is taken from the users
78245010Skarelsenvironment, with only the
78345010Skarels.Ev DISPLAY
78445010Skarelsand
78545010Skarels.Ev PRINTER
78645010Skarelsvariables being exported by default.
78745010SkarelsThe
78845010Skarels.Ev USER
78945010Skarelsvariable is also exported if the
79045010Skarels.Fl a
79145010Skarelsor
79245010Skarels.Fl l
79345010Skarelsoptions are used.
79445010Skarels.br
79545010SkarelsValid arguments for the \fBenviron\fP command are:
79645010Skarels.Tw Fl
79745010Skarels.Tp Cx Ic define
79845010Skarels.Cx \&\ \&
79945010Skarels.Ar variable value
80045010Skarels.Cx
80145010SkarelsDefine the variable
80245010Skarels.Ar variable
80345010Skarelsto have a value of
80445010Skarels.Ar value.
80545010SkarelsAny variables defined by this command are automatically exported.
80645010SkarelsThe
80745010Skarels.Ar value
80845010Skarelsmay be enclosed in single or double quotes so
80945010Skarelsthat tabs and spaces may be included.
81045010Skarels.Tp Cx Ic undefine
81145010Skarels.Cx \&\ \&
81245010Skarels.Ar variable
81345010Skarels.Cx
81445010SkarelsRemove
81545010Skarels.Ar variable
81645010Skarelsfrom the list of environment variables.
81745010Skarels.Tp Cx Ic export
81845010Skarels.Cx \&\ \&
81945010Skarels.Ar variable
82045010Skarels.Cx
82145010SkarelsMark the variable
82245010Skarels.Ar variable
82345010Skarelsto be exported to the remote side.
82445010Skarels.Tp Cx Ic unexport
82545010Skarels.Cx \&\ \&
82645010Skarels.Ar variable
82745010Skarels.Cx
82845010SkarelsMark the variable
82945010Skarels.Ar variable
83045010Skarelsto not be exported unless
83145010Skarelsexplicitly asked for by the remote side.
83245010Skarels.Tp Ic list
83345010SkarelsList the current set of environment variables.
83445010SkarelsThose marked with a \fB*\fR will be sent automatically,
83545010Skarelsother variables will only be sent if explicitly requested.
83643085Scael.Tp Ic \&?
83745010SkarelsPrints out help information for the
83845010Skarels.Ic environ
83945010Skarelscommand.
84045010Skarels.Tp
84143085Scael.Tp Cx Ic toggle
84243085Scael.Cx \&\ \&
84343085Scael.Ar arguments ...
84443085Scael.Cx
84527692SminshallToggle (between
84627692SminshallTRUE
84727692Sminshalland
84827692SminshallFALSE)
84927692Sminshallvarious flags that control how
85043085Scael.Nm telnet
85127692Sminshallresponds to events.
85238711SbormanThese flags may be set explicitly to TRUE or FALSE
85338711Sbormanusing the
85443085Scael.Ic set
85538711Sbormanand
85643085Scael.Ic unset
85738711Sbormancommands listed above.
85827692SminshallMore than one argument may be specified.
85927894SkarelsThe state of these flags may be interrogated with the
86043085Scael.Ic display
86127894Skarelscommand.
86227692SminshallValid arguments are:
86343085Scael.Tw Ar
86443085Scael.Tp Ic autoflush
86527692SminshallIf
86643085Scael.Ic autoflush
86727692Sminshalland
86843085Scael.Ic localchars
86927692Sminshallare both
87027692SminshallTRUE,
87127692Sminshallthen when the
87243085Scael.Ic ao  ,
87327692Sminshallor
87443085Scael.Ic quit
87527692Sminshallcharacters are recognized (and transformed into
87643085Scael.Li TELNET
87727692Sminshallsequences; see
87843085Scael.Ic set
87927692Sminshallabove for details),
88043085Scael.Nm telnet
88127692Sminshallrefuses to display any data on the user's terminal
88227692Sminshalluntil the remote system acknowledges (via a
88343085Scael.Li TELNET TIMING MARK
88427692Sminshalloption)
88527692Sminshallthat it has processed those
88643085Scael.Li TELNET
88727692Sminshallsequences.
88827692SminshallThe initial value for this toggle is TRUE if the terminal user had not
88927692Sminshalldone an "stty noflsh", otherwise FALSE (see
89043085Scael.Xr stty  1  ) .
89143085Scael.Tp Ic autosynch
89227894SkarelsIf
89343085Scael.Ic autosynch
89427894Skarelsand
89543085Scael.Ic localchars
89627894Skarelsare both
89727894SkarelsTRUE,
89827894Skarelsthen when either the
89943085Scael.Ic intr
90027894Skarelsor
90143085Scael.Ic quit
90227894Skarelscharacters is typed (see
90343085Scael.Ic set
90427894Skarelsabove for descriptions of the
90543085Scael.Ic intr
90627894Skarelsand
90743085Scael.Ic quit
90827894Skarelscharacters), the resulting
90943085Scael.Li TELNET
91027894Skarelssequence sent is followed by the
91143085Scael.Li TELNET SYNCH
91227894Skarelssequence.
91327894SkarelsThis procedure
91443085Scael.Ic should
91527894Skarelscause the remote system to begin throwing away all previously
91627894Skarelstyped input until both of the
91743085Scael.Li TELNET
91827894Skarelssequences have been read and acted upon.
91927894SkarelsThe initial value of this toggle is FALSE.
92043085Scael.Tp Ic binary
92138711SbormanEnable or disable the
92243085Scael.Li TELNET BINARY
92338910Sbormanoption on both input and output.
92443085Scael.Tp Ic inbinary
92538910SbormanEnable or disable the
92643085Scael.Li TELNET BINARY
92738910Sbormanoption on input.
92843085Scael.Tp Ic outbinary
92938910SbormanEnable or disable the
93043085Scael.Li TELNET BINARY
93138910Sbormanoption on output.
93243085Scael.Tp Ic crlf
93338711SbormanIf this is TRUE, then carriage returns will be sent as <CR><LF>.
93438711SbormanIf this is FALSE, then carriage returns will be send as <CR><NUL>.
93538711SbormanThe initial value for this toggle is FALSE.
93643085Scael.Tp Ic crmod
93727692SminshallToggle carriage return mode.
93827692SminshallWhen this mode is enabled, most carriage return characters received from
93927692Sminshallthe remote host will be mapped into a carriage return followed by
94027692Sminshalla line feed.
94127692SminshallThis mode does not affect those characters typed by the user, only
94227692Sminshallthose received from the remote host.
94327692SminshallThis mode is not very useful unless the remote host
94427692Sminshallonly sends carriage return, but never line feed.
94527692SminshallThe initial value for this toggle is FALSE.
94643085Scael.Tp Ic debug
94727692SminshallToggles socket level debugging (useful only to the
94843085Scael.Ic super user  ) .
94927692SminshallThe initial value for this toggle is FALSE.
95043085Scael.Tp Ic localchars
95138711SbormanIf this is
95238711SbormanTRUE,
95338711Sbormanthen the
95443085Scael.Ic flush  ,
95545010Skarels.Ic interrupt ,
95643085Scael.Ic quit  ,
95745010Skarels.Ic erase ,
95838711Sbormanand
95943085Scael.Ic kill
96038711Sbormancharacters (see
96143085Scael.Ic set
96238711Sbormanabove) are recognized locally, and transformed into (hopefully) appropriate
96343085Scael.Li TELNET
96438711Sbormancontrol sequences
96538711Sborman(respectively
96643085Scael.Ic ao  ,
96745010Skarels.Ic ip ,
96843085Scael.Ic brk  ,
96945010Skarels.Ic ec ,
97038711Sbormanand
97143085Scael.Ic el  ;
97238711Sbormansee
97343085Scael.Ic send
97438711Sbormanabove).
97543085ScaelThe initial value for this toggle is TRUE in \*(Lqold line by line\*(Rq mode,
97643085Scaeland FALSE in \*(Lqcharacter at a time\*(Rq mode.
97738711SbormanWhen the
97843085Scael.Li LINEMODE
97938711Sbormanoption is enabled, the value of
98043085Scael.Ic localchars
98138711Sbormanis ignored, and assumed to always be TRUE.
98238711SbormanIf
98343085Scael.Li LINEMODE
98438711Sbormanhas ever been enabled, then
98543085Scael.Ic quit
98638711Sbormanis sent as
98743085Scael.Ic abort  ,
98838711Sbormanand
98943085Scael.Ic eof and
99038711Sborman.B suspend
99138711Sbormanare sent as
99243085Scael.Ic eof and
99345010Skarels.Ic susp ,
99438711Sbormansee
99543085Scael.Ic send
99638711Sbormanabove).
99743085Scael.Tp Ic netdata
99838711SbormanToggles the display of all network data (in hexadecimal format).
99938711SbormanThe initial value for this toggle is FALSE.
100043085Scael.Tp Ic options
100127692SminshallToggles the display of some internal
100243085Scael.Nm telnet
100327692Sminshallprotocol processing (having to do with
100443085Scael.Li TELNET
100527692Sminshalloptions).
100627692SminshallThe initial value for this toggle is FALSE.
100743085Scael.Tp Ic prettydump
100838711SbormanWhen the
100943085Scael.Ic netdata
101038711Sbormantoggle is enabled, if
101143085Scael.Ic prettydump
101238711Sbormanis enabled the output from the
101343085Scael.Ic netdata
101438711Sbormancommand will be formated in a more user readable format.
101538711SbormanSpaces are put between each character in the output, and the
101638711Sbormanbegining of any
101743085Scael.Li TELNET
101838711Sbormanescape sequence is preceeded by a '*' to aid in locating them.
101943085Scael.Tp Ic \&?
102027692SminshallDisplays the legal
102143085Scael.Ic toggle
102227692Sminshallcommands.
102343085Scael.Tp
102443085Scael.Tp Ic z
102538711SbormanSuspend
102643085Scael.Nm telnet  .
102743085ScaelThis command only works when the user is using the
102843085Scael.Xr csh  1  .
102943085Scael.Tp Cx Ic \&!
103043085Scael.Cx \&\ \&
103143085Scael.Op Ar command
103243085Scael.Cx
103338711SbormanExecute a single command in a subshell on the local
103443085Scaelsystem.  If
103543085Scael.Ic command
103643085Scaelis ommitted, then an interactive
103738711Sbormansubshell is invoked.
103843085Scael.Tp Ic status
103943085ScaelShow the current status of
104043085Scael.Nm telnet  .
104138711SbormanThis includes the peer one is connected to, as well
104238711Sbormanas the current mode.
104343085Scael.Tp Cx Ic \&?
104443085Scael.Cx \&\ \&
104543085Scael.Op Ar command
104643085Scael.Cx
104738711SbormanGet help.  With no arguments,
104843085Scael.Nm telnet
104938711Sbormanprints a help summary.
105043085ScaelIf a command is specified,
105143085Scael.Nm telnet
105238711Sbormanwill print the help information for just that command.
105343085Scael.Sh ENVIRONMENT
105443085Scael.Nm Telnet
105545010Skarelsuses at least the
105643085Scael.Ev HOME ,
105745010Skarels.Ev SHELL ,
105845010Skarels.Ev DISPLAY ,
105943085Scaeland
106043085Scael.Ev TERM
106143085Scaelenvironent variables.
106245010SkarelsOther envirnoment variables may be propogated
106345010Skarelsto the other side via the
106445010Skarels.Li TELNET ENVIRON
106545010Skarelsoption.
106643085Scael.Sh FILES
106743085Scael.Dw ~/.telnetrc
106843085Scael.Di L
106943085Scael.Dp Pa ~/.telnetrc
107043085Scaeluser customized telnet startup values
107143085Scael.Dp
107243085Scael.Sh HISTORY
107343085Scael.Nm Telnet
107443085Scaelappeared in 4.2 BSD.
107543085Scael.Sh NOTES
107643085Scael.Pp
107727692SminshallOn some remote systems, echo has to be turned off manually when in
107843085Scael\*(Lqold line by line\*(Rq mode.
107943085Scael.Pp
108043085ScaelIn \*(Lqold line by line\*(Rq mode or
108143085Scael.Li LINEMODE
108243085Scaelthe terminal's
108343085Scael.Ic eof
108427692Sminshallcharacter is only recognized (and sent to the remote system)
108527692Sminshallwhen it is the first character on a line.
1086