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