1 | .\" Copyright (c) 1983 Regents of the University of California.
|
---|
2 | .\" All rights reserved. The Berkeley software License Agreement
|
---|
3 | .\" specifies the terms and conditions for redistribution.
|
---|
4 | .\"
|
---|
5 | .\" @(#)telnet.1c 6.5 (Berkeley) 5/10/86
|
---|
6 | .\"
|
---|
7 | .TH TELNET 1 "May 10, 1986"
|
---|
8 | .UC 5
|
---|
9 | .SH NAME
|
---|
10 | telnet \- user interface to the \s-1TELNET\s0 protocol
|
---|
11 | .SH SYNOPSIS
|
---|
12 | telnet [
|
---|
13 | .I host
|
---|
14 | [
|
---|
15 | .I port
|
---|
16 | ] ]
|
---|
17 | .SH DESCRIPTION
|
---|
18 | .I Telnet
|
---|
19 | is used to communicate with another host using the
|
---|
20 | .B TELNET
|
---|
21 | protocol.
|
---|
22 | If
|
---|
23 | .I telnet
|
---|
24 | is invoked without arguments, it enters command mode,
|
---|
25 | indicated by its prompt (\*(lqtelnet>\*(rq).
|
---|
26 | In this mode, it accepts and executes the commands listed below.
|
---|
27 | If it is invoked with arguments, it performs an
|
---|
28 | .B open
|
---|
29 | command (see below) with those arguments.
|
---|
30 | .PP
|
---|
31 | Once a connection has been opened,
|
---|
32 | .I telnet
|
---|
33 | enters an input mode.
|
---|
34 | The input mode entered will be either \*(lqcharacter at a time\*(rq
|
---|
35 | or \*(lqline by line\*(rq
|
---|
36 | depending on what the remote system supports.
|
---|
37 | .PP
|
---|
38 | In \*(lqcharacter at a time\*(rq mode, most
|
---|
39 | text typed is immediately sent to the remote host for processing.
|
---|
40 | .PP
|
---|
41 | In \*(lqline by line\*(rq mode, all text is echoed locally,
|
---|
42 | and (normally) only completed lines are sent to the remote host.
|
---|
43 | The \*(lqlocal echo character\*(rq (initially \*(lq^E\*(rq) may be used
|
---|
44 | to turn off and on the local echo
|
---|
45 | (this would mostly be used to enter passwords
|
---|
46 | without the password being echoed).
|
---|
47 | .PP
|
---|
48 | In either mode, if the
|
---|
49 | .I localchars
|
---|
50 | toggle is TRUE (the default in line mode; see below),
|
---|
51 | the user's
|
---|
52 | .IR quit ,
|
---|
53 | .IR intr ,
|
---|
54 | and
|
---|
55 | .I flush
|
---|
56 | characters are trapped locally, and sent as
|
---|
57 | .B TELNET
|
---|
58 | protocol sequences to the remote side.
|
---|
59 | There are options (see
|
---|
60 | .B toggle
|
---|
61 | .I autoflush
|
---|
62 | and
|
---|
63 | .B toggle
|
---|
64 | .I autosynch
|
---|
65 | below)
|
---|
66 | which cause this action to flush subsequent output to the terminal
|
---|
67 | (until the remote host acknowledges the
|
---|
68 | .B TELNET
|
---|
69 | sequence) and flush previous terminal input
|
---|
70 | (in the case of
|
---|
71 | .I quit
|
---|
72 | and
|
---|
73 | .IR intr ).
|
---|
74 | .PP
|
---|
75 | While connected to a remote host,
|
---|
76 | .I telnet
|
---|
77 | command mode may be entered by typing the
|
---|
78 | .I telnet
|
---|
79 | \*(lqescape character\*(rq (initially \*(lq^]\*(rq).
|
---|
80 | When in command mode, the normal terminal editing conventions are available.
|
---|
81 | .PP
|
---|
82 | .B COMMANDS
|
---|
83 | .PP
|
---|
84 | The following commands are available.
|
---|
85 | Only enough of each command to uniquely identify it need be typed
|
---|
86 | (this is also true for arguments to the
|
---|
87 | .BR mode ,
|
---|
88 | .BR set ,
|
---|
89 | .BR toggle ,
|
---|
90 | and
|
---|
91 | .B display
|
---|
92 | commands).
|
---|
93 | .PP
|
---|
94 | .TP
|
---|
95 | .B open \fIhost\fP \fR[\fP \fIport\fP \fR]\fP
|
---|
96 | .br
|
---|
97 | Open a connection to the named host.
|
---|
98 | If no port number
|
---|
99 | is specified,
|
---|
100 | .I telnet
|
---|
101 | will attempt to contact a
|
---|
102 | .B TELNET
|
---|
103 | server at the default port.
|
---|
104 | The host specification may be either a host name (see
|
---|
105 | .IR hosts (5))
|
---|
106 | or an Internet address specified in the \*(lqdot notation\*(rq (see
|
---|
107 | .IR inet (3N)).
|
---|
108 | .TP
|
---|
109 | .B close
|
---|
110 | .br
|
---|
111 | Close a
|
---|
112 | .B TELNET
|
---|
113 | session and return to command mode.
|
---|
114 | .TP
|
---|
115 | .B quit
|
---|
116 | .br
|
---|
117 | Close any open
|
---|
118 | .B TELNET
|
---|
119 | session and exit
|
---|
120 | .IR telnet .
|
---|
121 | An end of file (in command mode) will also close a session and exit.
|
---|
122 | .TP
|
---|
123 | .B z
|
---|
124 | .br
|
---|
125 | Suspend
|
---|
126 | .IR telnet .
|
---|
127 | This command only works when the user is using the
|
---|
128 | .IR csh (1).
|
---|
129 | .TP
|
---|
130 | .B mode \fItype\fP
|
---|
131 | .br
|
---|
132 | .I Type
|
---|
133 | is either
|
---|
134 | .I line
|
---|
135 | (for \*(lqline by line\*(rq mode)
|
---|
136 | or
|
---|
137 | .I character
|
---|
138 | (for \*(lqcharacter at a time\*(rq mode).
|
---|
139 | The remote host is asked for permission to go into the requested mode.
|
---|
140 | If the remote host is capable of entering that mode, the requested
|
---|
141 | mode will be entered.
|
---|
142 | .TP
|
---|
143 | .B status
|
---|
144 | .br
|
---|
145 | Show the current status of
|
---|
146 | .IR telnet .
|
---|
147 | This includes the peer one is connected to, as well
|
---|
148 | as the current mode.
|
---|
149 | .TP
|
---|
150 | .B display \fR[\fP \fIargument...\fP \fR]\fP
|
---|
151 | .br
|
---|
152 | Displays all, or some, of the
|
---|
153 | .B set
|
---|
154 | and
|
---|
155 | .B toggle
|
---|
156 | values (see below).
|
---|
157 | .TP
|
---|
158 | .B ? \fR[\fP \fIcommand\fP \fR]\fP
|
---|
159 | .br
|
---|
160 | Get help. With no arguments,
|
---|
161 | .I telnet
|
---|
162 | prints a help summary.
|
---|
163 | If a command is specified,
|
---|
164 | .I telnet
|
---|
165 | will print the help information for just that command.
|
---|
166 | .TP
|
---|
167 | .B send \fIarguments\fP
|
---|
168 | .br
|
---|
169 | Sends one or more special character sequences to the remote host.
|
---|
170 | The following are the arguments which may be specified
|
---|
171 | (more than one argument may be specified at a time):
|
---|
172 | .RS
|
---|
173 | .TP
|
---|
174 | .I escape
|
---|
175 | .br
|
---|
176 | Sends the current
|
---|
177 | .I telnet
|
---|
178 | escape character (initially \*(lq^]\*(rq).
|
---|
179 | .TP
|
---|
180 | .I synch
|
---|
181 | .br
|
---|
182 | Sends the
|
---|
183 | .B TELNET SYNCH
|
---|
184 | sequence.
|
---|
185 | This sequence causes the remote system to discard all previously typed
|
---|
186 | (but not yet read) input.
|
---|
187 | This sequence is sent as TCP urgent
|
---|
188 | data (and may not work if the remote system is a 4.2 BSD system -- if
|
---|
189 | it doesn't work, a lower case \*(lqr\*(rq may be echoed on the terminal).
|
---|
190 | .TP
|
---|
191 | .I brk
|
---|
192 | .br
|
---|
193 | Sends the
|
---|
194 | .B TELNET BRK
|
---|
195 | (Break) sequence, which may have significance to the remote
|
---|
196 | system.
|
---|
197 | .TP
|
---|
198 | .I ip
|
---|
199 | .br
|
---|
200 | Sends the
|
---|
201 | .B TELNET IP
|
---|
202 | (Interrupt Process) sequence, which should cause the remote
|
---|
203 | system to abort the currently running process.
|
---|
204 | .TP
|
---|
205 | .I ao
|
---|
206 | .br
|
---|
207 | Sends the
|
---|
208 | .B TELNET AO
|
---|
209 | (Abort Output) sequence, which should cause the remote system to flush
|
---|
210 | all output
|
---|
211 | .B from
|
---|
212 | the remote system
|
---|
213 | .B to
|
---|
214 | the user's terminal.
|
---|
215 | .TP
|
---|
216 | .I ayt
|
---|
217 | .br
|
---|
218 | Sends the
|
---|
219 | .B TELNET AYT
|
---|
220 | (Are You There)
|
---|
221 | sequence, to which the remote system may or may not choose to respond.
|
---|
222 | .TP
|
---|
223 | .I ec
|
---|
224 | .br
|
---|
225 | Sends the
|
---|
226 | .B TELNET EC
|
---|
227 | (Erase Character)
|
---|
228 | sequence, which should cause the remote system to erase the last character
|
---|
229 | entered.
|
---|
230 | .TP
|
---|
231 | .I el
|
---|
232 | .br
|
---|
233 | Sends the
|
---|
234 | .B TELNET EL
|
---|
235 | (Erase Line)
|
---|
236 | sequence, which should cause the remote system to erase the line currently
|
---|
237 | being entered.
|
---|
238 | .TP
|
---|
239 | .I ga
|
---|
240 | .br
|
---|
241 | Sends the
|
---|
242 | .B TELNET GA
|
---|
243 | (Go Ahead)
|
---|
244 | sequence, which likely has no significance to the remote system.
|
---|
245 | .TP
|
---|
246 | .I nop
|
---|
247 | .br
|
---|
248 | Sends the
|
---|
249 | .B TELNET NOP
|
---|
250 | (No OPeration)
|
---|
251 | sequence.
|
---|
252 | .TP
|
---|
253 | .I ?
|
---|
254 | .br
|
---|
255 | Prints out help information for the
|
---|
256 | .B send
|
---|
257 | command.
|
---|
258 | .RE
|
---|
259 | .TP
|
---|
260 | .B set \fIargument value\fP
|
---|
261 | .br
|
---|
262 | Set any one of a number of
|
---|
263 | .I telnet
|
---|
264 | variables to a specific value.
|
---|
265 | The special value \*(lqoff\*(rq turns off the function associated with
|
---|
266 | the variable.
|
---|
267 | The values of variables may be interrogated with the
|
---|
268 | .B display
|
---|
269 | command.
|
---|
270 | The variables which may be specified are:
|
---|
271 | .RS
|
---|
272 | .TP
|
---|
273 | .I echo
|
---|
274 | .br
|
---|
275 | This is the value (initially \*(lq^E\*(rq) which, when in
|
---|
276 | \*(lqline by line\*(rq mode, toggles between doing local echoing
|
---|
277 | of entered characters (for normal processing), and suppressing
|
---|
278 | echoing of entered characters (for entering, say, a password).
|
---|
279 | .TP
|
---|
280 | .I escape
|
---|
281 | .br
|
---|
282 | This is the
|
---|
283 | .I telnet
|
---|
284 | escape character (initially \*(lq^[\*(rq) which causes entry
|
---|
285 | into
|
---|
286 | .I telnet
|
---|
287 | command mode (when connected to a remote system).
|
---|
288 | .TP
|
---|
289 | .I interrupt
|
---|
290 | .br
|
---|
291 | If
|
---|
292 | .I telnet
|
---|
293 | is in
|
---|
294 | .I localchars
|
---|
295 | mode (see
|
---|
296 | .B toggle
|
---|
297 | .I localchars
|
---|
298 | below)
|
---|
299 | and the
|
---|
300 | .I interrupt
|
---|
301 | character is typed, a
|
---|
302 | .B TELNET IP
|
---|
303 | sequence (see
|
---|
304 | .B send
|
---|
305 | .I ip
|
---|
306 | above)
|
---|
307 | is sent to the remote host.
|
---|
308 | The initial value for the interrupt character is taken to be
|
---|
309 | the terminal's
|
---|
310 | .B intr
|
---|
311 | character.
|
---|
312 | .TP
|
---|
313 | .I quit
|
---|
314 | .br
|
---|
315 | If
|
---|
316 | .I telnet
|
---|
317 | is in
|
---|
318 | .I localchars
|
---|
319 | mode (see
|
---|
320 | .B toggle
|
---|
321 | .I localchars
|
---|
322 | below)
|
---|
323 | and the
|
---|
324 | .I quit
|
---|
325 | character is typed, a
|
---|
326 | .B TELNET BRK
|
---|
327 | sequence (see
|
---|
328 | .B send
|
---|
329 | .I brk
|
---|
330 | above)
|
---|
331 | is sent to the remote host.
|
---|
332 | The initial value for the quit character is taken to be
|
---|
333 | the terminal's
|
---|
334 | .B quit
|
---|
335 | character.
|
---|
336 | .TP
|
---|
337 | .I flushoutput
|
---|
338 | .br
|
---|
339 | If
|
---|
340 | .I telnet
|
---|
341 | is in
|
---|
342 | .I localchars
|
---|
343 | mode (see
|
---|
344 | .B toggle
|
---|
345 | .I localchars
|
---|
346 | below)
|
---|
347 | and the
|
---|
348 | .I flushoutput
|
---|
349 | character is typed, a
|
---|
350 | .B TELNET AO
|
---|
351 | sequence (see
|
---|
352 | .B send
|
---|
353 | .I ao
|
---|
354 | above)
|
---|
355 | is sent to the remote host.
|
---|
356 | The initial value for the flush character is taken to be
|
---|
357 | the terminal's
|
---|
358 | .B flush
|
---|
359 | character.
|
---|
360 | .TP
|
---|
361 | .I erase
|
---|
362 | .br
|
---|
363 | If
|
---|
364 | .I telnet
|
---|
365 | is in
|
---|
366 | .I localchars
|
---|
367 | mode (see
|
---|
368 | .B toggle
|
---|
369 | .I localchars
|
---|
370 | below),
|
---|
371 | .B and
|
---|
372 | if
|
---|
373 | .I telnet
|
---|
374 | is operating in \*(lqcharacter at a time\*(rq mode, then when this
|
---|
375 | character is typed, a
|
---|
376 | .B TELNET EC
|
---|
377 | sequence (see
|
---|
378 | .B send
|
---|
379 | .I ec
|
---|
380 | above)
|
---|
381 | is sent to the remote system.
|
---|
382 | The initial value for the erase character is taken to be
|
---|
383 | the terminal's
|
---|
384 | .B erase
|
---|
385 | character.
|
---|
386 | .TP
|
---|
387 | .I kill
|
---|
388 | .br
|
---|
389 | If
|
---|
390 | .I telnet
|
---|
391 | is in
|
---|
392 | .I localchars
|
---|
393 | mode (see
|
---|
394 | .B toggle
|
---|
395 | .I localchars
|
---|
396 | below),
|
---|
397 | .B and
|
---|
398 | if
|
---|
399 | .I telnet
|
---|
400 | is operating in \*(lqcharacter at a time\*(rq mode, then when this
|
---|
401 | character is typed, a
|
---|
402 | .B TELNET EL
|
---|
403 | sequence (see
|
---|
404 | .B send
|
---|
405 | .I el
|
---|
406 | above)
|
---|
407 | is sent to the remote system.
|
---|
408 | The initial value for the kill character is taken to be
|
---|
409 | the terminal's
|
---|
410 | .B kill
|
---|
411 | character.
|
---|
412 | .TP
|
---|
413 | .I eof
|
---|
414 | .br
|
---|
415 | If
|
---|
416 | .I telnet
|
---|
417 | is operating in \*(lqline by line\*(rq mode, entering this character
|
---|
418 | as the first character on a line will cause this character to be
|
---|
419 | sent to the remote system.
|
---|
420 | The initial value of the eof character is taken to be the terminal's
|
---|
421 | .B eof
|
---|
422 | character.
|
---|
423 | .RE
|
---|
424 | .TP
|
---|
425 | .B toggle \fIarguments...\fP
|
---|
426 | .br
|
---|
427 | Toggle (between
|
---|
428 | TRUE
|
---|
429 | and
|
---|
430 | FALSE)
|
---|
431 | various flags that control how
|
---|
432 | .I telnet
|
---|
433 | responds to events.
|
---|
434 | More than one argument may be specified.
|
---|
435 | The state of these flags may be interrogated with the
|
---|
436 | .B display
|
---|
437 | command.
|
---|
438 | Valid arguments are:
|
---|
439 | .RS
|
---|
440 | .TP
|
---|
441 | .I localchars
|
---|
442 | .br
|
---|
443 | If this is
|
---|
444 | TRUE,
|
---|
445 | then the
|
---|
446 | .IR flush ,
|
---|
447 | .IR interrupt ,
|
---|
448 | .IR quit ,
|
---|
449 | .IR erase ,
|
---|
450 | and
|
---|
451 | .I kill
|
---|
452 | characters (see
|
---|
453 | .B set
|
---|
454 | above) are recognized locally, and transformed into (hopefully) appropriate
|
---|
455 | .B TELNET
|
---|
456 | control sequences
|
---|
457 | (respectively
|
---|
458 | .IR ao ,
|
---|
459 | .IR ip ,
|
---|
460 | .IR brk ,
|
---|
461 | .IR ec ,
|
---|
462 | and
|
---|
463 | .IR el ;
|
---|
464 | see
|
---|
465 | .B send
|
---|
466 | above).
|
---|
467 | The initial value for this toggle is TRUE in \*(lqline by line\*(rq mode,
|
---|
468 | and FALSE in \*(lqcharacter at a time\*(rq mode.
|
---|
469 | .TP
|
---|
470 | .I autoflush
|
---|
471 | .br
|
---|
472 | If
|
---|
473 | .I autoflush
|
---|
474 | and
|
---|
475 | .I localchars
|
---|
476 | are both
|
---|
477 | TRUE,
|
---|
478 | then when the
|
---|
479 | .IR ao ,
|
---|
480 | .IR intr ,
|
---|
481 | or
|
---|
482 | .I quit
|
---|
483 | characters are recognized (and transformed into
|
---|
484 | .B TELNET
|
---|
485 | sequences; see
|
---|
486 | .B set
|
---|
487 | above for details),
|
---|
488 | .I telnet
|
---|
489 | refuses to display any data on the user's terminal
|
---|
490 | until the remote system acknowledges (via a
|
---|
491 | .B TELNET
|
---|
492 | .I Timing Mark
|
---|
493 | option)
|
---|
494 | that it has processed those
|
---|
495 | .B TELNET
|
---|
496 | sequences.
|
---|
497 | The initial value for this toggle is TRUE if the terminal user had not
|
---|
498 | done an "stty noflsh", otherwise FALSE (see
|
---|
499 | .IR stty(1)).
|
---|
500 | .TP
|
---|
501 | .I autosynch
|
---|
502 | If
|
---|
503 | .I autosynch
|
---|
504 | and
|
---|
505 | .I localchars
|
---|
506 | are both
|
---|
507 | TRUE,
|
---|
508 | then when either the
|
---|
509 | .I intr
|
---|
510 | or
|
---|
511 | .I quit
|
---|
512 | characters is typed (see
|
---|
513 | .B set
|
---|
514 | above for descriptions of the
|
---|
515 | .I intr
|
---|
516 | and
|
---|
517 | .I quit
|
---|
518 | characters), the resulting
|
---|
519 | .B TELNET
|
---|
520 | sequence sent is followed by the
|
---|
521 | .B TELNET SYNCH
|
---|
522 | sequence.
|
---|
523 | This procedure
|
---|
524 | .B should
|
---|
525 | cause the remote system to begin throwing away all previously
|
---|
526 | typed input until both of the
|
---|
527 | .B TELNET
|
---|
528 | sequences have been read and acted upon.
|
---|
529 | The initial value of this toggle is FALSE.
|
---|
530 | .TP
|
---|
531 | .I crmod
|
---|
532 | .br
|
---|
533 | Toggle carriage return mode.
|
---|
534 | When this mode is enabled, most carriage return characters received from
|
---|
535 | the remote host will be mapped into a carriage return followed by
|
---|
536 | a line feed.
|
---|
537 | This mode does not affect those characters typed by the user, only
|
---|
538 | those received from the remote host.
|
---|
539 | This mode is not very useful unless the remote host
|
---|
540 | only sends carriage return, but never line feed.
|
---|
541 | The initial value for this toggle is FALSE.
|
---|
542 | .TP
|
---|
543 | .I debug
|
---|
544 | .br
|
---|
545 | Toggles socket level debugging (useful only to the
|
---|
546 | .IR super user ).
|
---|
547 | The initial value for this toggle is FALSE.
|
---|
548 | .TP
|
---|
549 | .I options
|
---|
550 | .br
|
---|
551 | Toggles the display of some internal
|
---|
552 | .I telnet
|
---|
553 | protocol processing (having to do with
|
---|
554 | .B TELNET
|
---|
555 | options).
|
---|
556 | The initial value for this toggle is FALSE.
|
---|
557 | .TP
|
---|
558 | .I netdata
|
---|
559 | .br
|
---|
560 | Toggles the display of all network data (in hexadecimal format).
|
---|
561 | The initial value for this toggle is FALSE.
|
---|
562 | .TP
|
---|
563 | .I ?
|
---|
564 | .br
|
---|
565 | Displays the legal
|
---|
566 | .B toggle
|
---|
567 | commands.
|
---|
568 | .RE
|
---|
569 | .SH BUGS
|
---|
570 | .PP
|
---|
571 | There is no adequate way for dealing with flow control.
|
---|
572 | .PP
|
---|
573 | On some remote systems, echo has to be turned off manually when in
|
---|
574 | \*(lqline by line\*(rq mode.
|
---|
575 | .PP
|
---|
576 | There is enough settable state to justify a
|
---|
577 | .RI . telnetrc
|
---|
578 | file.
|
---|
579 | .PP
|
---|
580 | No capability for a
|
---|
581 | .RI . telnetrc
|
---|
582 | file is provided.
|
---|
583 | .PP
|
---|
584 | In \*(lqline by line\*(rq mode, the terminal's
|
---|
585 | .I eof
|
---|
586 | character is only recognized (and sent to the remote system)
|
---|
587 | when it is the first character on a line.
|
---|