2 TELNET(1) UNIX Reference Manual TELNET(1)
5 t
\bte
\bel
\bln
\bne
\bet
\bt - user interface to the TELNET protocol
7 S
\bSY
\bYN
\bNO
\bOP
\bPS
\bSI
\bIS
\bS
8 t
\bte
\bel
\bln
\bne
\bet
\bt [-
\b-7
\b78
\b8E
\bEF
\bFK
\bKL
\bLa
\bac
\bcd
\bdf
\bfr
\brx
\bx] [-
\b-S
\bS _
\bt_
\bo_
\bs] [-
\b-X
\bX _
\ba_
\bu_
\bt_
\bh_
\bt_
\by_
\bp_
\be] [-
\b-e
\be _
\be_
\bs_
\bc_
\ba_
\bp_
\be_
\bc_
\bh_
\ba_
\br] [-
\b-k
\bk _
\br_
\be_
\ba_
\bl_
\bm]
9 [-
\b-l
\bl _
\bu_
\bs_
\be_
\br] [-
\b-n
\bn _
\bt_
\br_
\ba_
\bc_
\be_
\bf_
\bi_
\bl_
\be] [_
\bh_
\bo_
\bs_
\bt [port]]
11 D
\bDE
\bES
\bSC
\bCR
\bRI
\bIP
\bPT
\bTI
\bIO
\bON
\bN
12 The t
\bte
\bel
\bln
\bne
\bet
\bt command is used to communicate with another host using the
13 TELNET protocol. If t
\bte
\bel
\bln
\bne
\bet
\bt is invoked without the _
\bh_
\bo_
\bs_
\bt argument, it en-
14 ters command mode, indicated by its prompt (t
\bte
\bel
\bln
\bne
\bet
\bt>
\b>). In this mode, it
15 accepts and executes the commands listed below. If it is invoked with
16 arguments, it performs an o
\bop
\bpe
\ben
\bn command with those arguments.
20 -
\b-8
\b8 Specifies an 8-bit data path. This causes an attempt to negoti-
21 ate the TELNET BINARY option on both input and output.
23 -
\b-7
\b7 Do not try to negotiate TELNET BINARY option.
25 -
\b-E
\bE Stops any character from being recognized as an escape character.
27 -
\b-F
\bF If Kerberos V5 authentication is being used, the -
\b-F
\bF option allows
28 the local credentials to be forwarded to the remote system, in-
29 cluding any credentials that have already been forwarded into the
32 -
\b-K
\bK Specifies no automatic login to the remote system.
34 -
\b-L
\bL Specifies an 8-bit data path on output. This causes the BINARY
35 option to be negotiated on output.
37 -
\b-S
\bS _
\bt_
\bo_
\bs Sets the IP type-of-service (TOS) option for the telnet connec-
38 tion to the value _
\bt_
\bo_
\bs, which can be a numeric TOS value or, on
39 systems that support it, a symbolic TOS name found in the
42 -
\b-X
\bX _
\ba_
\bt_
\by_
\bp_
\be
43 Disables the _
\ba_
\bt_
\by_
\bp_
\be type of authentication.
45 -
\b-a
\ba Attempt automatic login. Currently, this sends the user name via
46 the USER variable of the ENVIRON option if supported by the re-
47 mote system. The name used is that of the current user as re-
48 turned by getlogin(2) if it agrees with the current user ID, oth-
49 erwise it is the name associated with the user ID.
51 -
\b-c
\bc Disables the reading of the user's _
\b._
\bt_
\be_
\bl_
\bn_
\be_
\bt_
\br_
\bc file. (See the
52 t
\bto
\bog
\bgg
\bgl
\ble
\be s
\bsk
\bki
\bip
\bpr
\brc
\bc command on this man page.)
54 -
\b-d
\bd Sets the initial value of the d
\bde
\beb
\bbu
\bug
\bg toggle to TRUE
56 -
\b-e
\be _
\be_
\bs_
\bc_
\ba_
\bp_
\be _
\bc_
\bh_
\ba_
\br
57 Sets the initial t
\bte
\bel
\bln
\bne
\bet
\bt t
\bte
\bel
\bln
\bne
\bet
\bt escape character to _
\be_
\bs_
\bc_
\ba_
\bp_
\be _
\bc_
\bh_
\ba_
\br.
58 If _
\be_
\bs_
\bc_
\ba_
\bp_
\be _
\bc_
\bh_
\ba_
\br is omitted, then there will be no escape charac-
61 -
\b-f
\bf If Kerberos V5 authentication is being used, the -
\b-f
\bf option allows
62 the local credentials to be forwarded to the remote system.
64 -
\b-k
\bk _
\br_
\be_
\ba_
\bl_
\bm
65 If Kerberos authentication is being used, the -
\b-k
\bk option requests
66 that telnet obtain tickets for the remote host in realm realm in-
67 stead of the remote host's realm, as determined by
70 -
\b-l
\bl _
\bu_
\bs_
\be_
\br
71 When connecting to the remote system, if the remote system under-
72 stands the ENVIRON option, then _
\bu_
\bs_
\be_
\br will be sent to the remote
73 system as the value for the variable USER. This option implies
74 the -
\b-a
\ba option. This option may also be used with the o
\bop
\bpe
\ben
\bn com-
77 -
\b-n
\bn _
\bt_
\br_
\ba_
\bc_
\be_
\bf_
\bi_
\bl_
\be
78 Opens _
\bt_
\br_
\ba_
\bc_
\be_
\bf_
\bi_
\bl_
\be for recording trace information. See the s
\bse
\bet
\bt
79 t
\btr
\bra
\bac
\bce
\bef
\bfi
\bil
\ble
\be command below.
81 -
\b-r
\br Specifies a user interface similar to rlogin(1). In this mode,
82 the escape character is set to the tilde (~) character, unless
83 modified by the -e option.
85 -
\b-x
\bx Turn on encryption of the data stream. When this option is
86 turned on, will exit with an error if authentication cannot be
87 negotiated or if encryption cannot be turned on.
89 _
\bh_
\bo_
\bs_
\bt Indicates the official name, an alias, or the Internet address of
92 _
\bp_
\bo_
\br_
\bt Indicates a port number (address of an application). If a number
93 is not specified, the default t
\bte
\bel
\bln
\bne
\bet
\bt port is used.
95 When in rlogin mode, a line of the form ~. disconnects from the remote
96 host; ~ is the telnet escape character. Similarly, the line ~^Z suspends
97 the telnet session. The line ~^] escapes to the normal telnet escape
100 Once a connection has been opened, t
\bte
\bel
\bln
\bne
\bet
\bt will attempt to enable the
101 TELNET LINEMODE option. If this fails, then t
\bte
\bel
\bln
\bne
\bet
\bt will revert to one of
102 two input modes: either ``character at a time'' or ``old line by line''
103 depending on what the remote system supports.
105 When LINEMODE is enabled, character processing is done on the local sys-
106 tem, under the control of the remote system. When input editing or char-
107 acter echoing is to be disabled, the remote system will relay that infor-
108 mation. The remote system will also relay changes to any special charac-
109 ters that happen on the remote system, so that they can take effect on
112 In ``character at a time'' mode, most text typed is immediately sent to
113 the remote host for processing.
115 In ``old line by line'' mode, all text is echoed locally, and (normally)
116 only completed lines are sent to the remote host. The ``local echo char-
117 acter'' (initially ``^E'') may be used to turn off and on the local echo
118 (this would mostly be used to enter passwords without the password being
121 If the LINEMODE option is enabled, or if the l
\blo
\boc
\bca
\bal
\blc
\bch
\bha
\bar
\brs
\bs toggle is TRUE
122 (the default for ``old line by line``; see below), the user's q
\bqu
\bui
\bit
\bt, i
\bin
\bnt
\btr
\br,
123 and f
\bfl
\blu
\bus
\bsh
\bh characters are trapped locally, and sent as TELNET protocol se-
124 quences to the remote side. If LINEMODE has ever been enabled, then the
125 user's s
\bsu
\bus
\bsp
\bp and e
\beo
\bof
\bf are also sent as TELNET protocol sequences, and q
\bqu
\bui
\bit
\bt
126 is sent as a TELNET ABORT instead of BREAK There are options (see t
\bto
\bog
\bgg
\bgl
\ble
\be
127 a
\bau
\but
\bto
\bof
\bfl
\blu
\bus
\bsh
\bh and t
\bto
\bog
\bgg
\bgl
\ble
\be a
\bau
\but
\bto
\bos
\bsy
\byn
\bnc
\bch
\bh below) which cause this action to flush
128 subsequent output to the terminal (until the remote host acknowledges the
129 TELNET sequence) and flush previous terminal input (in the case of q
\bqu
\bui
\bit
\bt
130 and i
\bin
\bnt
\btr
\br).
133 While connected to a remote host, t
\bte
\bel
\bln
\bne
\bet
\bt command mode may be entered by
134 typing the t
\bte
\bel
\bln
\bne
\bet
\bt ``escape character'' (initially ``^]''). When in com-
135 mand mode, the normal terminal editing conventions are available.
137 The following t
\bte
\bel
\bln
\bne
\bet
\bt commands are available. Only enough of each command
138 to uniquely identify it need be typed (this is also true for arguments to
139 the m
\bmo
\bod
\bde
\be, s
\bse
\bet
\bt, t
\bto
\bog
\bgg
\bgl
\ble
\be, u
\bun
\bns
\bse
\bet
\bt, s
\bsl
\blc
\bc, e
\ben
\bnv
\bvi
\bir
\bro
\bon
\bn, and d
\bdi
\bis
\bsp
\bpl
\bla
\bay
\by commands).
141 a
\bau
\but
\bth
\bh _
\ba_
\br_
\bg_
\bu_
\bm_
\be_
\bn_
\bt _
\b._
\b._
\b.
142 The auth command manipulates the information sent through the
143 TELNET AUTHENTICATE option. Valid arguments for the auth com-
146 d
\bdi
\bis
\bsa
\bab
\bbl
\ble
\be _
\bt_
\by_
\bp_
\be Disables the specified type of authentication.
147 To obtain a list of available types, use the
148 a
\bau
\but
\bth
\bh d
\bdi
\bis
\bsa
\bab
\bbl
\ble
\be ?
\b? command.
150 e
\ben
\bna
\bab
\bbl
\ble
\be _
\bt_
\by_
\bp_
\be Enables the specified type of authentication.
151 To obtain a list of available types, use the
152 a
\bau
\but
\bth
\bh e
\ben
\bna
\bab
\bbl
\ble
\be ?
\b? command.
154 s
\bst
\bta
\bat
\btu
\bus
\bs Lists the current status of the various types of
157 c
\bcl
\blo
\bos
\bse
\be Close a TELNET session and return to command mode.
159 d
\bdi
\bis
\bsp
\bpl
\bla
\bay
\by _
\ba_
\br_
\bg_
\bu_
\bm_
\be_
\bn_
\bt _
\b._
\b._
\b.
160 Displays all, or some, of the s
\bse
\bet
\bt and t
\bto
\bog
\bgg
\bgl
\ble
\be values (see be-
163 e
\ben
\bnc
\bcr
\bry
\byp
\bpt
\bt _
\ba_
\br_
\bg_
\bu_
\bm_
\be_
\bn_
\bt _
\b._
\b._
\b.
164 The encrypt command manipulates the information sent through
165 the TELNET ENCRYPT option.
167 Note: Because of export controls, the TELNET ENCRYPT option
168 is not supported outside of the United States and Canada.
170 Valid arguments for the encrypt command are as follows:
172 d
\bdi
\bis
\bsa
\bab
\bbl
\ble
\be _
\bt_
\by_
\bp_
\be [i
\bin
\bnp
\bpu
\but
\bt | o
\bou
\but
\btp
\bpu
\but
\bt]
173 Disables the specified type of encryption. If
174 you omit the input and output, both input and
175 output are disabled. To obtain a list of avail-
176 able types, use the e
\ben
\bnc
\bcr
\bry
\byp
\bpt
\bt d
\bdi
\bis
\bsa
\bab
\bbl
\ble
\be ?
\b? command.
178 e
\ben
\bna
\bab
\bbl
\ble
\be _
\bt_
\by_
\bp_
\be [i
\bin
\bnp
\bpu
\but
\bt | o
\bou
\but
\btp
\bpu
\but
\bt]
179 Enables the specified type of encryption. If
180 you omit input and output, both input and output
181 are enabled. To obtain a list of available
182 types, use the e
\ben
\bnc
\bcr
\bry
\byp
\bpt
\bt e
\ben
\bna
\bab
\bbl
\ble
\be ?
\b? command.
184 i
\bin
\bnp
\bpu
\but
\bt This is the same as the e
\ben
\bnc
\bcr
\bry
\byp
\bpt
\bt s
\bst
\bta
\bar
\brt
\bt i
\bin
\bnp
\bpu
\but
\bt com-
187 -
\b-i
\bin
\bnp
\bpu
\but
\bt This is the same as the e
\ben
\bnc
\bcr
\bry
\byp
\bpt
\bt s
\bst
\bto
\bop
\bp i
\bin
\bnp
\bpu
\but
\bt com-
190 o
\bou
\but
\btp
\bpu
\but
\bt This is the same as the e
\ben
\bnc
\bcr
\bry
\byp
\bpt
\bt s
\bst
\bta
\bar
\brt
\bt o
\bou
\but
\btp
\bpu
\but
\bt
193 -
\b-o
\bou
\but
\btp
\bpu
\but
\bt This is the same as the e
\ben
\bnc
\bcr
\bry
\byp
\bpt
\bt s
\bst
\bto
\bop
\bp o
\bou
\but
\btp
\bpu
\but
\bt com-
196 s
\bst
\bta
\bar
\brt
\bt [i
\bin
\bnp
\bpu
\but
\bt | o
\bou
\but
\btp
\bpu
\but
\bt]
197 Attempts to start encryption. If you omit i
\bin
\bnp
\bpu
\but
\bt
198 and o
\bou
\but
\btp
\bpu
\but
\bt, both input and output are enabled.
199 To obtain a list of available types, use the
200 e
\ben
\bnc
\bcr
\bry
\byp
\bpt
\bt e
\ben
\bna
\bab
\bbl
\ble
\be ?
\b? command.
202 s
\bst
\bta
\bat
\btu
\bus
\bs Lists the current status of encryption.
204 s
\bst
\bto
\bop
\bp [i
\bin
\bnp
\bpu
\but
\bt | o
\bou
\but
\btp
\bpu
\but
\bt]
205 Stops encryption. If you omit input and output,
206 encryption is on both input and output.
208 t
\bty
\byp
\bpe
\be _
\bt_
\by_
\bp_
\be Sets the default type of encryption to be used
209 with later e
\ben
\bnc
\bcr
\bry
\byp
\bpt
\bt s
\bst
\bta
\bar
\brt
\bt or e
\ben
\bnc
\bcr
\bry
\byp
\bpt
\bt s
\bst
\bto
\bop
\bp com-
212 e
\ben
\bnv
\bvi
\bir
\bro
\bon
\bn _
\ba_
\br_
\bg_
\bu_
\bm_
\be_
\bn_
\bt_
\bs _
\b._
\b._
\b.
213 The e
\ben
\bnv
\bvi
\bir
\bro
\bon
\bn command is used to manipulate the the variables
214 that my be sent through the TELNET ENVIRON option. The ini-
215 tial set of variables is taken from the users environment,
216 with only the DISPLAY and PRINTER variables being exported by
217 default. The USER variable is also exported if the -
\b-a
\ba or -
\b-l
\bl
220 Valid arguments for the e
\ben
\bnv
\bvi
\bir
\bro
\bon
\bn command are:
222 d
\bde
\bef
\bfi
\bin
\bne
\be _
\bv_
\ba_
\br_
\bi_
\ba_
\bb_
\bl_
\be _
\bv_
\ba_
\bl_
\bu_
\be
223 Define the variable _
\bv_
\ba_
\br_
\bi_
\ba_
\bb_
\bl_
\be to have a value of
224 _
\bv_
\ba_
\bl_
\bu_
\be. Any variables defined by this command are
225 automatically exported. The _
\bv_
\ba_
\bl_
\bu_
\be may be enclosed
226 in single or double quotes so that tabs and spaces
229 u
\bun
\bnd
\bde
\bef
\bfi
\bin
\bne
\be _
\bv_
\ba_
\br_
\bi_
\ba_
\bb_
\bl_
\be
230 Remove _
\bv_
\ba_
\br_
\bi_
\ba_
\bb_
\bl_
\be from the list of environment vari-
233 e
\bex
\bxp
\bpo
\bor
\brt
\bt _
\bv_
\ba_
\br_
\bi_
\ba_
\bb_
\bl_
\be
234 Mark the variable _
\bv_
\ba_
\br_
\bi_
\ba_
\bb_
\bl_
\be to be exported to the
237 u
\bun
\bne
\bex
\bxp
\bpo
\bor
\brt
\bt _
\bv_
\ba_
\br_
\bi_
\ba_
\bb_
\bl_
\be
238 Mark the variable _
\bv_
\ba_
\br_
\bi_
\ba_
\bb_
\bl_
\be to not be exported un-
239 less explicitly asked for by the remote side.
241 l
\bli
\bis
\bst
\bt List the current set of environment variables.
242 Those marked with a *
\b* will be sent automatically,
243 other variables will only be sent if explicitly
246 ?
\b? Prints out help information for the e
\ben
\bnv
\bvi
\bir
\bro
\bon
\bn com-
249 l
\blo
\bog
\bgo
\bou
\but
\bt Sends the TELNET LOGOUT option to the remote side. This com-
250 mand is similar to a c
\bcl
\blo
\bos
\bse
\be command; however, if the remote
251 side does not support the LOGOUT option, nothing happens. If,
252 however, the remote side does support the LOGOUT option, this
253 command should cause the remote side to close the TELNET con-
254 nection. If the remote side also supports the concept of sus-
255 pending a user's session for later reattachment, the logout
256 argument indicates that you should terminate the session imme-
259 m
\bmo
\bod
\bde
\be _
\bt_
\by_
\bp_
\be _
\bT_
\by_
\bp_
\be is one of several options, depending on the state of the
260 TELNET session. The remote host is asked for permission to go
261 into the requested mode. If the remote host is capable of en-
264 tering that mode, the requested mode will be entered.
266 c
\bch
\bha
\bar
\bra
\bac
\bct
\bte
\ber
\br Disable the TELNET LINEMODE option, or, if the
267 remote side does not understand the LINEMODE op-
268 tion, then enter ``character at a time`` mode.
270 l
\bli
\bin
\bne
\be Enable the TELNET LINEMODE option, or, if the
271 remote side does not understand the LINEMODE op-
272 tion, then attempt to enter ``old-line-by-line``
275 i
\bis
\bsi
\big
\bg (-
\b-i
\bis
\bsi
\big
\bg) Attempt to enable (disable) the TRAPSIG mode of
276 the LINEMODE option. This requires that the
277 LINEMODE option be enabled.
279 e
\bed
\bdi
\bit
\bt (-
\b-e
\bed
\bdi
\bit
\bt) Attempt to enable (disable) the EDIT mode of the
280 LINEMODE option. This requires that the
281 LINEMODE option be enabled.
283 s
\bso
\bof
\bft
\btt
\bta
\bab
\bbs
\bs (-
\b-s
\bso
\bof
\bft
\btt
\bta
\bab
\bbs
\bs)
284 Attempt to enable (disable) the SOFT_TAB mode of
285 the LINEMODE option. This requires that the
286 LINEMODE option be enabled.
288 l
\bli
\bit
\bte
\bec
\bch
\bho
\bo (-
\b-l
\bli
\bit
\bte
\bec
\bch
\bho
\bo)
289 Attempt to enable (disable) the LIT_ECHO mode of
290 the LINEMODE option. This requires that the
291 LINEMODE option be enabled.
293 ?
\b? Prints out help information for the m
\bmo
\bod
\bde
\be com-
296 o
\bop
\bpe
\ben
\bn _
\bh_
\bo_
\bs_
\bt [-
\b-l
\bl _
\bu_
\bs_
\be_
\br] [[-
\b-]_
\bp_
\bo_
\br_
\bt]
297 Open a connection to the named host. If no port number is
298 specified, t
\bte
\bel
\bln
\bne
\bet
\bt will attempt to contact a TELNET server at
299 the default port. The host specification may be either a host
300 name (see hosts(5)) or an Internet address specified in the
301 ``dot notation'' (see inet(3)). The [-
\b-l
\bl] option may be used
302 to specify the user name to be passed to the remote system via
303 the ENVIRON option. When connecting to a non-standard port,
304 t
\bte
\bel
\bln
\bne
\bet
\bt omits any automatic initiation of TELNET options. When
305 the port number is preceded by a minus sign, the initial op-
306 tion negotiation is done. After establishing a connection,
307 the file _
\b._
\bt_
\be_
\bl_
\bn_
\be_
\bt_
\br_
\bc in the users home directory is opened.
308 Lines beginning with a # are comment lines. Blank lines are
309 ignored. Lines that begin without white space are the start
310 of a machine entry. The first thing on the line is the name
311 of the machine that is being connected to. The rest of the
312 line, and successive lines that begin with white space are as-
313 sumed to be t
\bte
\bel
\bln
\bne
\bet
\bt commands and are processed as if they had
314 been typed in manually to the t
\bte
\bel
\bln
\bne
\bet
\bt command prompt.
316 q
\bqu
\bui
\bit
\bt Close any open TELNET session and exit t
\bte
\bel
\bln
\bne
\bet
\bt. An end of file
317 (in command mode) will also close a session and exit.
319 s
\bse
\ben
\bnd
\bd _
\ba_
\br_
\bg_
\bu_
\bm_
\be_
\bn_
\bt_
\bs
320 Sends one or more special character sequences to the remote
321 host. The following are the arguments which may be specified
322 (more than one argument may be specified at a time):
324 a
\bab
\bbo
\bor
\brt
\bt Sends the TELNET ABORT (Abort processes) sequence.
326 a
\bao
\bo Sends the TELNET AO (Abort Output) sequence, which
327 should cause the remote system to flush all output
330 _
\bf_
\br_
\bo_
\bm the remote system _
\bt_
\bo the user's terminal.
332 a
\bay
\byt
\bt Sends the TELNET AYT (Are You There) sequence, to
333 which the remote system may or may not choose to re-
336 b
\bbr
\brk
\bk Sends the TELNET BRK (Break) sequence, which may have
337 significance to the remote system.
339 e
\bec
\bc Sends the TELNET EC (Erase Character) sequence, which
340 should cause the remote system to erase the last char-
343 e
\bel
\bl Sends the TELNET EL (Erase Line) sequence, which
344 should cause the remote system to erase the line cur-
345 rently being entered.
347 e
\beo
\bof
\bf Sends the TELNET EOF (End Of File) sequence.
349 e
\beo
\bor
\br Sends the TELNET EOR (End of Record) sequence.
351 e
\bes
\bsc
\bca
\bap
\bpe
\be Sends the current t
\bte
\bel
\bln
\bne
\bet
\bt escape character (initially
354 g
\bga
\ba Sends the TELNET GA (Go Ahead) sequence, which likely
355 has no significance to the remote system.
357 g
\bge
\bet
\bts
\bst
\bta
\bat
\btu
\bus
\bs
358 If the remote side supports the TELNET STATUS command,
359 g
\bge
\bet
\bts
\bst
\bta
\bat
\btu
\bus
\bs will send the subnegotiation to request that
360 the server send its current option status.
362 i
\bip
\bp Sends the TELNET IP (Interrupt Process) sequence,
363 which should cause the remote system to abort the cur-
364 rently running process.
366 n
\bno
\bop
\bp Sends the TELNET NOP (No OPeration) sequence.
368 s
\bsu
\bus
\bsp
\bp Sends the TELNET SUSP (SUSPend process) sequence.
370 s
\bsy
\byn
\bnc
\bch
\bh Sends the TELNET SYNCH sequence. This sequence causes
371 the remote system to discard all previously typed (but
372 not yet read) input. This sequence is sent as TCP ur-
373 gent data (and may not work if the remote system is a
374 4.2BSD system -- if it doesn't work, a lower case
375 ``r'' may be echoed on the terminal).
377 d
\bdo
\bo _
\bc_
\bm_
\bd
379 d
\bdo
\bon
\bnt
\bt _
\bc_
\bm_
\bd
381 w
\bwi
\bil
\bll
\bl _
\bc_
\bm_
\bd
383 w
\bwo
\bon
\bnt
\bt _
\bc_
\bm_
\bd
384 Sends the TELNET DO _
\bc_
\bm_
\bd sequence. _
\bC_
\bm_
\bd can be either a
385 decimal number between 0 and 255, or a symbolic name
386 for a specific TELNET command. _
\bC_
\bm_
\bd can also be either
387 h
\bhe
\bel
\blp
\bp or ?
\b? to print out help information, including a
388 list of known symbolic names.
390 ?
\b? Prints out help information for the s
\bse
\ben
\bnd
\bd command.
392 s
\bse
\bet
\bt _
\ba_
\br_
\bg_
\bu_
\bm_
\be_
\bn_
\bt _
\bv_
\ba_
\bl_
\bu_
\be
394 u
\bun
\bns
\bse
\bet
\bt _
\ba_
\br_
\bg_
\bu_
\bm_
\be_
\bn_
\bt _
\bv_
\ba_
\bl_
\bu_
\be
395 The s
\bse
\bet
\bt command will set any one of a number of t
\bte
\bel
\bln
\bne
\bet
\bt vari-
396 ables to a specific value or to TRUE. The special value o
\bof
\bff
\bf
397 turns off the function associated with the variable, this is
398 equivalent to using the u
\bun
\bns
\bse
\bet
\bt command. The u
\bun
\bns
\bse
\bet
\bt command will
399 disable or set to FALSE any of the specified functions. The
400 values of variables may be interrogated with the d
\bdi
\bis
\bsp
\bpl
\bla
\bay
\by com-
401 mand. The variables which may be set or unset, but not tog-
402 gled, are listed here. In addition, any of the variables for
403 the t
\bto
\bog
\bgg
\bgl
\ble
\be command may be explicitly set or unset using the
404 s
\bse
\bet
\bt and u
\bun
\bns
\bse
\bet
\bt commands.
406 a
\bay
\byt
\bt If TELNET is in localchars mode, or LINEMODE is en-
407 abled, and the status character is typed, a TELNET AYT
408 sequence (see s
\bse
\ben
\bnd
\bd a
\bay
\byt
\bt preceding) is sent to the re-
409 mote host. The initial value for the "Are You There"
410 character is the terminal's status character.
412 e
\bec
\bch
\bho
\bo This is the value (initially ``^E'') which, when in
413 ``line by line'' mode, toggles between doing local
414 echoing of entered characters (for normal processing),
415 and suppressing echoing of entered characters (for en-
416 tering, say, a password).
418 e
\beo
\bof
\bf If t
\bte
\bel
\bln
\bne
\bet
\bt is operating in LINEMODE or ``old line by
419 line'' mode, entering this character as the first
420 character on a line will cause this character to be
421 sent to the remote system. The initial value of the
422 eof character is taken to be the terminal's e
\beo
\bof
\bf char-
425 e
\ber
\bra
\bas
\bse
\be If t
\bte
\bel
\bln
\bne
\bet
\bt is in l
\blo
\boc
\bca
\bal
\blc
\bch
\bha
\bar
\brs
\bs mode (see t
\bto
\bog
\bgg
\bgl
\ble
\be l
\blo
\boc
\bca
\bal
\blc
\bch
\bha
\bar
\brs
\bs
426 below), a
\ban
\bnd
\bd if t
\bte
\bel
\bln
\bne
\bet
\bt is operating in ``character at a
427 time'' mode, then when this character is typed, a
428 TELNET EC sequence (see s
\bse
\ben
\bnd
\bd e
\bec
\bc above) is sent to the
429 remote system. The initial value for the erase char-
430 acter is taken to be the terminal's e
\ber
\bra
\bas
\bse
\be character.
432 e
\bes
\bsc
\bca
\bap
\bpe
\be This is the t
\bte
\bel
\bln
\bne
\bet
\bt escape character (initially ``^['')
433 which causes entry into t
\bte
\bel
\bln
\bne
\bet
\bt command mode (when con-
434 nected to a remote system).
436 f
\bfl
\blu
\bus
\bsh
\bho
\bou
\but
\btp
\bpu
\but
\bt
437 If t
\bte
\bel
\bln
\bne
\bet
\bt is in l
\blo
\boc
\bca
\bal
\blc
\bch
\bha
\bar
\brs
\bs mode (see t
\bto
\bog
\bgg
\bgl
\ble
\be l
\blo
\boc
\bca
\bal
\blc
\bch
\bha
\bar
\brs
\bs
438 below) and the f
\bfl
\blu
\bus
\bsh
\bho
\bou
\but
\btp
\bpu
\but
\bt character is typed, a
439 TELNET AO sequence (see s
\bse
\ben
\bnd
\bd a
\bao
\bo above) is sent to the
440 remote host. The initial value for the flush charac-
441 ter is taken to be the terminal's f
\bfl
\blu
\bus
\bsh
\bh character.
445 f
\bfo
\bor
\brw
\bw2
\b2 If TELNET is operating in LINEMODE, these are the
446 characters that, when typed, cause partial lines to be
447 forwarded to the remote system. The initial value for
448 the forwarding characters are taken from the termi-
449 nal's eol and eol2 characters.
451 i
\bin
\bnt
\bte
\ber
\brr
\bru
\bup
\bpt
\bt
452 If t
\bte
\bel
\bln
\bne
\bet
\bt is in l
\blo
\boc
\bca
\bal
\blc
\bch
\bha
\bar
\brs
\bs mode (see t
\bto
\bog
\bgg
\bgl
\ble
\be l
\blo
\boc
\bca
\bal
\blc
\bch
\bha
\bar
\brs
\bs
453 below) and the i
\bin
\bnt
\bte
\ber
\brr
\bru
\bup
\bpt
\bt character is typed, a TELNET
454 IP sequence (see s
\bse
\ben
\bnd
\bd i
\bip
\bp above) is sent to the remote
455 host. The initial value for the interrupt character
456 is taken to be the terminal's i
\bin
\bnt
\btr
\br character.
458 k
\bki
\bil
\bll
\bl If t
\bte
\bel
\bln
\bne
\bet
\bt is in l
\blo
\boc
\bca
\bal
\blc
\bch
\bha
\bar
\brs
\bs mode (see t
\bto
\bog
\bgg
\bgl
\ble
\be l
\blo
\boc
\bca
\bal
\blc
\bch
\bha
\bar
\brs
\bs
459 below), a
\ban
\bnd
\bd if t
\bte
\bel
\bln
\bne
\bet
\bt is operating in ``character at a
460 time'' mode, then when this character is typed, a
461 TELNET EL sequence (see s
\bse
\ben
\bnd
\bd e
\bel
\bl above) is sent to the
462 remote system. The initial value for the kill charac-
463 ter is taken to be the terminal's k
\bki
\bil
\bll
\bl character.
465 l
\bln
\bne
\bex
\bxt
\bt If t
\bte
\bel
\bln
\bne
\bet
\bt is operating in LINEMODE or ``old line by
466 line`` mode, then this character is taken to be the
467 terminal's l
\bln
\bne
\bex
\bxt
\bt character. The initial value for the
468 lnext character is taken to be the terminal's l
\bln
\bne
\bex
\bxt
\bt
471 q
\bqu
\bui
\bit
\bt If t
\bte
\bel
\bln
\bne
\bet
\bt is in l
\blo
\boc
\bca
\bal
\blc
\bch
\bha
\bar
\brs
\bs mode (see t
\bto
\bog
\bgg
\bgl
\ble
\be l
\blo
\boc
\bca
\bal
\blc
\bch
\bha
\bar
\brs
\bs
472 below) and the q
\bqu
\bui
\bit
\bt character is typed, a TELNET BRK
473 sequence (see s
\bse
\ben
\bnd
\bd b
\bbr
\brk
\bk above) is sent to the remote
474 host. The initial value for the quit character is
475 taken to be the terminal's q
\bqu
\bui
\bit
\bt character.
477 r
\bre
\bep
\bpr
\bri
\bin
\bnt
\bt
478 If t
\bte
\bel
\bln
\bne
\bet
\bt is operating in LINEMODE or ``old line by
479 line`` mode, then this character is taken to be the
480 terminal's r
\bre
\bep
\bpr
\bri
\bin
\bnt
\bt character. The initial value for
481 the reprint character is taken to be the terminal's
482 r
\bre
\bep
\bpr
\bri
\bin
\bnt
\bt character.
484 r
\brl
\blo
\bog
\bgi
\bin
\bn This is the rlogin escape character. If set, the nor-
485 mal TELNET escape character is ignored unless it is
486 preceded by this character at the beginning of a line.
487 This character, at the beginning of a line followed by
488 a "." closes the connection; when followed by a ^Z it
489 suspends the telnet command. The initial state is to
490 disable the rlogin escape character.
492 s
\bst
\bta
\bar
\brt
\bt If the TELNET TOGGLE-FLOW-CONTROL option has been en-
493 abled, then this character is taken to be the termi-
494 nal's s
\bst
\bta
\bar
\brt
\bt character. The initial value for the kill
495 character is taken to be the terminal's s
\bst
\bta
\bar
\brt
\bt charac-
498 s
\bst
\bto
\bop
\bp If the TELNET TOGGLE-FLOW-CONTROL option has been en-
499 abled, then this character is taken to be the termi-
500 nal's s
\bst
\bto
\bop
\bp character. The initial value for the kill
501 character is taken to be the terminal's s
\bst
\bto
\bop
\bp charac-
504 s
\bsu
\bus
\bsp
\bp If t
\bte
\bel
\bln
\bne
\bet
\bt is in l
\blo
\boc
\bca
\bal
\blc
\bch
\bha
\bar
\brs
\bs mode, or LINEMODE is en-
505 abled, and the s
\bsu
\bus
\bsp
\bpe
\ben
\bnd
\bd character is typed, a TELNET
506 SUSP sequence (see s
\bse
\ben
\bnd
\bd s
\bsu
\bus
\bsp
\bp above) is sent to the re-
507 mote host. The initial value for the suspend charac-
508 ter is taken to be the terminal's s
\bsu
\bus
\bsp
\bpe
\ben
\bnd
\bd character.
510 t
\btr
\bra
\bac
\bce
\bef
\bfi
\bil
\ble
\be
511 This is the file to which the output, caused by
512 n
\bne
\bet
\btd
\bda
\bat
\bta
\ba or o
\bop
\bpt
\bti
\bio
\bon
\bn tracing being TRUE, will be written.
513 If it is set to ``-
\b-'', then tracing information will
514 be written to standard output (the default).
516 w
\bwo
\bor
\brd
\bde
\ber
\bra
\bas
\bse
\be
517 If t
\bte
\bel
\bln
\bne
\bet
\bt is operating in LINEMODE or ``old line by
518 line`` mode, then this character is taken to be the
519 terminal's w
\bwo
\bor
\brd
\bde
\ber
\bra
\bas
\bse
\be character. The initial value for
520 the worderase character is taken to be the terminal's
521 w
\bwo
\bor
\brd
\bde
\ber
\bra
\bas
\bse
\be character.
523 ?
\b? Displays the legal s
\bse
\bet
\bt (u
\bun
\bns
\bse
\bet
\bt) commands.
525 s
\bsl
\blc
\bc _
\bs_
\bt_
\ba_
\bt_
\be The s
\bsl
\blc
\bc command (Set Local Characters) is used to set or
526 change the state of the the special characters when the TELNET
527 LINEMODE option has been enabled. Special characters are
528 characters that get mapped to TELNET commands sequences (like
529 i
\bip
\bp or q
\bqu
\bui
\bit
\bt) or line editing characters (like e
\ber
\bra
\bas
\bse
\be and k
\bki
\bil
\bll
\bl).
530 By default, the local special characters are exported.
532 c
\bch
\bhe
\bec
\bck
\bk Verify the current settings for the current spe-
533 cial characters. The remote side is requested to
534 send all the current special character settings,
535 and if there are any discrepancies with the local
536 side, the local side will switch to the remote
539 e
\bex
\bxp
\bpo
\bor
\brt
\bt Switch to the local defaults for the special char-
540 acters. The local default characters are those of
541 the local terminal at the time when t
\bte
\bel
\bln
\bne
\bet
\bt was
544 i
\bim
\bmp
\bpo
\bor
\brt
\bt Switch to the remote defaults for the special
545 characters. The remote default characters are
546 those of the remote system at the time when the
547 TELNET connection was established.
549 ?
\b? Prints out help information for the s
\bsl
\blc
\bc command.
551 s
\bst
\bta
\bat
\btu
\bus
\bs Show the current status of t
\bte
\bel
\bln
\bne
\bet
\bt. This includes the peer one
552 is connected to, as well as the current mode.
554 t
\bto
\bog
\bgg
\bgl
\ble
\be _
\ba_
\br_
\bg_
\bu_
\bm_
\be_
\bn_
\bt_
\bs _
\b._
\b._
\b.
555 Toggle (between TRUE and FALSE) various flags that control how
556 t
\bte
\bel
\bln
\bne
\bet
\bt responds to events. These flags may be set explicitly
557 to TRUE or FALSE using the s
\bse
\bet
\bt and u
\bun
\bns
\bse
\bet
\bt commands listed
558 above. More than one argument may be specified. The state of
559 these flags may be interrogated with the d
\bdi
\bis
\bsp
\bpl
\bla
\bay
\by command.
562 a
\bau
\but
\bth
\bhd
\bde
\beb
\bbu
\bug
\bg Turns on debugging information for the authenti-
565 a
\bau
\but
\bto
\bof
\bfl
\blu
\bus
\bsh
\bh If a
\bau
\but
\bto
\bof
\bfl
\blu
\bus
\bsh
\bh and l
\blo
\boc
\bca
\bal
\blc
\bch
\bha
\bar
\brs
\bs are both TRUE, then
566 when the a
\bao
\bo, or q
\bqu
\bui
\bit
\bt characters are recognized
567 (and transformed into TELNET sequences; see s
\bse
\bet
\bt
568 above for details), t
\bte
\bel
\bln
\bne
\bet
\bt refuses to display
569 any data on the user's terminal until the remote
570 system acknowledges (via a TELNET TIMING MARK
571 option) that it has processed those TELNET se-
572 quences. The initial value for this toggle is
573 TRUE if the terminal user had not done an "stty
574 noflsh", otherwise FALSE (see stty(1)).
576 a
\bau
\but
\bto
\bod
\bde
\bec
\bcr
\bry
\byp
\bpt
\bt When the TELNET ENCRYPT option is negotiated, by
577 default the actual encryption (decryption) of
578 the data stream does not start automatically.
579 The autoencrypt (autodecrypt) command states
580 that encryption of the output (input) stream
581 should be enabled as soon as possible.
583 Note: Because of export controls, the TELNET
584 ENCRYPT option is not supported outside the
585 United States and Canada.
587 a
\bau
\but
\bto
\bol
\blo
\bog
\bgi
\bin
\bn If the remote side supports the TELNET
588 AUTHENTICATION option TELNET attempts to use it
589 to perform automatic authentication. If the
590 AUTHENTICATION option is not supported, the us-
591 er's login name are propagated through the
592 TELNET ENVIRON option. This command is the same
594 as specifying _
\ba option on the o
\bop
\bpe
\ben
\bn command.
596 a
\bau
\but
\bto
\bos
\bsy
\byn
\bnc
\bch
\bh If a
\bau
\but
\bto
\bos
\bsy
\byn
\bnc
\bch
\bh and l
\blo
\boc
\bca
\bal
\blc
\bch
\bha
\bar
\brs
\bs are both TRUE, then
597 when either the i
\bin
\bnt
\btr
\br or q
\bqu
\bui
\bit
\bt characters is typed
598 (see s
\bse
\bet
\bt above for descriptions of the i
\bin
\bnt
\btr
\br and
599 q
\bqu
\bui
\bit
\bt characters), the resulting TELNET sequence
600 sent is followed by the TELNET SYNCH sequence.
601 This procedure s
\bsh
\bho
\bou
\bul
\bld
\bd cause the remote system to
602 begin throwing away all previously typed input
603 until both of the TELNET sequences have been
604 read and acted upon. The initial value of this
607 b
\bbi
\bin
\bna
\bar
\bry
\by Enable or disable the TELNET BINARY option on
608 both input and output.
610 i
\bin
\bnb
\bbi
\bin
\bna
\bar
\bry
\by Enable or disable the TELNET BINARY option on
613 o
\bou
\but
\btb
\bbi
\bin
\bna
\bar
\bry
\by Enable or disable the TELNET BINARY option on
616 c
\bcr
\brl
\blf
\bf If this is TRUE, then carriage returns will be
617 sent as <CR><LF>. If this is FALSE, then car-
618 riage returns will be send as <CR><NUL>. The
619 initial value for this toggle is FALSE.
621 c
\bcr
\brm
\bmo
\bod
\bd Toggle carriage return mode. When this mode is
622 enabled, most carriage return characters re-
623 ceived from the remote host will be mapped into
624 a carriage return followed by a line feed. This
625 mode does not affect those characters typed by
626 the user, only those received from the remote
627 host. This mode is not very useful unless the
628 remote host only sends carriage return, but nev-
629 er line feed. The initial value for this toggle
632 d
\bde
\beb
\bbu
\bug
\bg Toggles socket level debugging (useful only to
633 the s
\bsu
\bup
\bpe
\ber
\br u
\bus
\bse
\ber
\br). The initial value for this tog-
636 e
\ben
\bnc
\bcd
\bde
\beb
\bbu
\bug
\bg Turns on debugging information for the encryp-
639 l
\blo
\boc
\bca
\bal
\blc
\bch
\bha
\bar
\brs
\bs If this is TRUE, then the f
\bfl
\blu
\bus
\bsh
\bh, i
\bin
\bnt
\bte
\ber
\brr
\bru
\bup
\bpt
\bt,
640 q
\bqu
\bui
\bit
\bt, e
\ber
\bra
\bas
\bse
\be, and k
\bki
\bil
\bll
\bl characters (see s
\bse
\bet
\bt above)
641 are recognized locally, and transformed into
642 (hopefully) appropriate TELNET control sequences
643 (respectively a
\bao
\bo, i
\bip
\bp, b
\bbr
\brk
\bk, e
\bec
\bc, and e
\bel
\bl; see s
\bse
\ben
\bnd
\bd
644 above). The initial value for this toggle is
645 TRUE in ``old line by line'' mode, and FALSE in
646 ``character at a time'' mode. When the LINEMODE
647 option is enabled, the value of l
\blo
\boc
\bca
\bal
\blc
\bch
\bha
\bar
\brs
\bs is
648 ignored, and assumed to always be TRUE. If
649 LINEMODE has ever been enabled, then q
\bqu
\bui
\bit
\bt is
650 sent as a
\bab
\bbo
\bor
\brt
\bt, and e
\beo
\bof
\bf and s
\bsu
\bus
\bsp
\bpe
\ben
\bnd
\bd are sent as
651 e
\beo
\bof
\bf and s
\bsu
\bus
\bsp
\bp, see s
\bse
\ben
\bnd
\bd above).
653 n
\bne
\bet
\btd
\bda
\bat
\bta
\ba Toggles the display of all network data (in hex-
654 adecimal format). The initial value for this
657 o
\bop
\bpt
\bti
\bio
\bon
\bns
\bs Toggles the display of some internal t
\bte
\bel
\bln
\bne
\bet
\bt pro-
658 tocol processing (having to do with TELNET op-
659 tions). The initial value for this toggle is
663 p
\bpr
\bre
\bet
\btt
\bty
\byd
\bdu
\bum
\bmp
\bp When the n
\bne
\bet
\btd
\bda
\bat
\bta
\ba toggle is enabled, if
664 p
\bpr
\bre
\bet
\btt
\bty
\byd
\bdu
\bum
\bmp
\bp is enabled the output from the
665 n
\bne
\bet
\btd
\bda
\bat
\bta
\ba command will be formatted in a more user
666 readable format. Spaces are put between each
667 character in the output, and the beginning of
668 any TELNET escape sequence is preceded by a '*'
669 to aid in locating them.
671 s
\bsk
\bki
\bip
\bpr
\brc
\bc When the skiprc toggle is TRUE, TELNET skips the
672 reading of the _
\b._
\bt_
\be_
\bl_
\bn_
\be_
\bt_
\br_
\bc file in the users home
673 directory when connections are opened. The ini-
674 tial value for this toggle is FALSE.
676 t
\bte
\ber
\brm
\bmd
\bda
\bat
\bta
\ba Toggles the display of all terminal data (in
677 hexadecimal format). The initial value for this
680 v
\bve
\ber
\brb
\bbo
\bos
\bse
\be_
\b_e
\ben
\bnc
\bcr
\bry
\byp
\bpt
\bt
681 When the v
\bve
\ber
\brb
\bbo
\bos
\bse
\be_
\b_e
\ben
\bnc
\bcr
\bry
\byp
\bpt
\bt toggle is TRUE, TELNET
682 prints out a message each time encryption is en-
683 abled or disabled. The initial value for this
684 toggle is FALSE. Note: Because of export con-
685 trols, data encryption is not supported outside
686 of the United States and Canada.
688 ?
\b? Displays the legal t
\bto
\bog
\bgg
\bgl
\ble
\be commands.
690 z
\bz Suspend t
\bte
\bel
\bln
\bne
\bet
\bt. This command only works when the user is using
693 !
\b! [_
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd]
694 Execute a single command in a subshell on the local system.
695 If c
\bco
\bom
\bmm
\bma
\ban
\bnd
\bd is omitted, then an interactive subshell is in-
698 ?
\b? [_
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd]
699 Get help. With no arguments, t
\bte
\bel
\bln
\bne
\bet
\bt prints a help summary.
700 If a command is specified, t
\bte
\bel
\bln
\bne
\bet
\bt will print the help informa-
701 tion for just that command.
703 E
\bEN
\bNV
\bVI
\bIR
\bRO
\bON
\bNM
\bME
\bEN
\bNT
\bT
704 T
\bTe
\bel
\bln
\bne
\bet
\bt uses at least the HOME, SHELL, DISPLAY, and TERM environment vari-
705 ables. Other environment variables may be propagated to the other side
706 via the TELNET ENVIRON option.
709 ~/.telnetrc user customized telnet startup values
711 H
\bHI
\bIS
\bST
\bTO
\bOR
\bRY
\bY
712 The T
\bTe
\bel
\bln
\bne
\bet
\bt command appeared in 4.2BSD.
715 On some remote systems, echo has to be turned off manually when in ``old
718 In ``old line by line'' mode or LINEMODE the terminal's e
\beo
\bof
\bf character is
719 only recognized (and sent to the remote system) when it is the first
722 4.2 Berkeley Distribution June 1, 1994 11