remove gcc34
[dragonfly.git] / crypto / heimdal-0.6.3 / appl / telnet / telnetd / telnetd.8
1 .\" Copyright (c) 1983, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by the University of
15 .\"     California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)telnetd.8   8.4 (Berkeley) 6/1/94
33 .\"
34 .Dd June 1, 1994
35 .Dt TELNETD 8
36 .Os BSD 4.2
37 .Sh NAME
38 .Nm telnetd
39 .Nd DARPA
40 .Tn TELNET
41 protocol server
42 .Sh SYNOPSIS
43 .Nm telnetd
44 .Op Fl BUhkln
45 .Op Fl D Ar debugmode
46 .Op Fl S Ar tos
47 .Op Fl X Ar authtype
48 .Op Fl a Ar authmode
49 .Op Fl r Ns Ar lowpty-highpty
50 .Op Fl u Ar len
51 .Op Fl debug
52 .Op Fl L Ar /bin/login
53 .Op Fl y
54 .Op Ar port
55 .Sh DESCRIPTION
56 The
57 .Nm telnetd
58 command is a server which supports the
59 .Tn DARPA
60 standard
61 .Tn TELNET
62 virtual terminal protocol.
63 .Nm Telnetd
64 is normally invoked by the internet server (see
65 .Xr inetd 8 )
66 for requests to connect to the
67 .Tn TELNET
68 port as indicated by the
69 .Pa /etc/services
70 file (see
71 .Xr services 5 ) .
72 The
73 .Fl debug
74 option may be used to start up
75 .Nm telnetd
76 manually, instead of through
77 .Xr inetd 8 .
78 If started up this way,
79 .Ar port
80 may be specified to run
81 .Nm telnetd
82 on an alternate
83 .Tn TCP
84 port number.
85 .Pp
86 The
87 .Nm telnetd
88 command accepts the following options:
89 .Bl -tag -width "-a authmode"
90 .It Fl a Ar authmode
91 This option may be used for specifying what mode should
92 be used for authentication.
93 Note that this option is only useful if
94 .Nm telnetd
95 has been compiled with support for the
96 .Dv AUTHENTICATION
97 option.
98 There are several valid values for
99 .Ar authmode :
100 .Bl -tag -width debug
101 .It debug
102 Turns on authentication debugging code.
103 .It user
104 Only allow connections when the remote user
105 can provide valid authentication information
106 to identify the remote user,
107 and is allowed access to the specified account
108 without providing a password.
109 .It valid
110 Only allow connections when the remote user
111 can provide valid authentication information
112 to identify the remote user.
113 The
114 .Xr login 1
115 command will provide any additional user verification
116 needed if the remote user is not allowed automatic
117 access to the specified account.
118 .It other
119 Only allow connections that supply some authentication information.
120 This option is currently not supported
121 by any of the existing authentication mechanisms,
122 and is thus the same as specifying
123 .Fl a
124 .Cm valid .
125 .It otp
126 Only allow authenticated connections (as with
127 .Fl a
128 .Cm user )
129 and also logins with one-time passwords (OTPs).  This option will call
130 login with an option so that only OTPs are accepted.  The user can of
131 course still type secret information at the prompt.
132 .It none
133 This is the default state.
134 Authentication information is not required.
135 If no or insufficient authentication information
136 is provided, then the
137 .Xr login 1
138 program will provide the necessary user
139 verification.
140 .It off
141 This disables the authentication code.
142 All user verification will happen through the
143 .Xr login 1
144 program.
145 .El
146 .It Fl B
147 Ignored.
148 .It Fl D Ar debugmode
149 This option may be used for debugging purposes.
150 This allows
151 .Nm telnetd
152 to print out debugging information
153 to the connection, allowing the user to see what
154 .Nm telnetd
155 is doing.
156 There are several possible values for
157 .Ar debugmode :
158 .Bl -tag -width exercise
159 .It Cm options
160 Prints information about the negotiation of
161 .Tn TELNET
162 options.
163 .It Cm report
164 Prints the
165 .Cm options
166 information, plus some additional information
167 about what processing is going on.
168 .It Cm netdata
169 Displays the data stream received by
170 .Nm telnetd .
171 .It Cm ptydata
172 Displays data written to the pty.
173 .It Cm exercise
174 Has not been implemented yet.
175 .El
176 .It Fl h
177 Disables the printing of host-specific information before
178 login has been completed.
179 .It Fl k
180 .It Fl l
181 Ignored.
182 .It Fl n
183 Disable
184 .Dv TCP
185 keep-alives.  Normally
186 .Nm telnetd
187 enables the
188 .Tn TCP
189 keep-alive mechanism to probe connections that
190 have been idle for some period of time to determine
191 if the client is still there, so that idle connections
192 from machines that have crashed or can no longer
193 be reached may be cleaned up.
194 .It Fl r Ar lowpty-highpty
195 This option is only enabled when
196 .Nm telnetd
197 is compiled for
198 .Dv UNICOS .
199 It specifies an inclusive range of pseudo-terminal devices to
200 use.  If the system has sysconf variable
201 .Dv _SC_CRAY_NPTY
202 configured, the default pty search range is 0 to
203 .Dv _SC_CRAY_NPTY ;
204 otherwise, the default range is 0 to 128.  Either
205 .Ar lowpty
206 or
207 .Ar highpty
208 may be omitted to allow changing
209 either end of the search range.  If
210 .Ar lowpty
211 is omitted, the - character is still required so that
212 .Nm telnetd
213 can differentiate
214 .Ar highpty
215 from
216 .Ar lowpty .
217 .It Fl S Ar tos
218 .It Fl u Ar len
219 This option is used to specify the size of the field
220 in the
221 .Dv utmp
222 structure that holds the remote host name.
223 If the resolved host name is longer than
224 .Ar len ,
225 the dotted decimal value will be used instead.
226 This allows hosts with very long host names that
227 overflow this field to still be uniquely identified.
228 Specifying
229 .Fl u0
230 indicates that only dotted decimal addresses
231 should be put into the
232 .Pa utmp
233 file.
234 .It Fl U
235 This option causes
236 .Nm telnetd
237 to refuse connections from addresses that
238 cannot be mapped back into a symbolic name
239 via the
240 .Xr gethostbyaddr 3
241 routine.
242 .It Fl X Ar authtype
243 This option is only valid if
244 .Nm telnetd
245 has been built with support for the authentication option.
246 It disables the use of
247 .Ar authtype
248 authentication, and
249 can be used to temporarily disable
250 a specific authentication type without having to recompile
251 .Nm telnetd .
252 .It Fl L Ar pathname
253 Specify pathname to an alternative login program.
254 .It Fl y
255 Makes
256 .Nm
257 not warn when a user is trying to login with a cleartext password.
258 .El
259 .Pp
260 .Nm Telnetd
261 operates by allocating a pseudo-terminal device (see
262 .Xr pty 4 )
263 for a client, then creating a login process which has
264 the slave side of the pseudo-terminal as
265 .Dv stdin ,
266 .Dv stdout
267 and
268 .Dv stderr .
269 .Nm Telnetd
270 manipulates the master side of the pseudo-terminal,
271 implementing the
272 .Tn TELNET
273 protocol and passing characters
274 between the remote client and the login process.
275 .Pp
276 When a
277 .Tn TELNET
278 session is started up,
279 .Nm telnetd
280 sends
281 .Tn TELNET
282 options to the client side indicating
283 a willingness to do the
284 following
285 .Tn TELNET
286 options, which are described in more detail below:
287 .Bd -literal -offset indent
288 DO AUTHENTICATION
289 WILL ENCRYPT
290 DO TERMINAL TYPE
291 DO TSPEED
292 DO XDISPLOC
293 DO NEW-ENVIRON
294 DO ENVIRON
295 WILL SUPPRESS GO AHEAD
296 DO ECHO
297 DO LINEMODE
298 DO NAWS
299 WILL STATUS
300 DO LFLOW
301 DO TIMING-MARK
302 .Ed
303 .Pp
304 The pseudo-terminal allocated to the client is configured
305 to operate in
306 .Dq cooked
307 mode, and with
308 .Dv XTABS and
309 .Dv CRMOD
310 enabled (see
311 .Xr tty 4 ) .
312 .Pp
313 .Nm Telnetd
314 has support for enabling locally the following
315 .Tn TELNET
316 options:
317 .Bl -tag -width "DO AUTHENTICATION"
318 .It "WILL ECHO"
319 When the
320 .Dv LINEMODE
321 option is enabled, a
322 .Dv WILL ECHO
323 or
324 .Dv WONT ECHO
325 will be sent to the client to indicate the
326 current state of terminal echoing.
327 When terminal echo is not desired, a
328 .Dv WILL ECHO
329 is sent to indicate that
330 .Tn telnetd
331 will take care of echoing any data that needs to be
332 echoed to the terminal, and then nothing is echoed.
333 When terminal echo is desired, a
334 .Dv WONT ECHO
335 is sent to indicate that
336 .Tn telnetd
337 will not be doing any terminal echoing, so the
338 client should do any terminal echoing that is needed.
339 .It "WILL BINARY"
340 Indicates that the client is willing to send a
341 8 bits of data, rather than the normal 7 bits
342 of the Network Virtual Terminal.
343 .It "WILL SGA"
344 Indicates that it will not be sending
345 .Dv IAC GA ,
346 go ahead, commands.
347 .It "WILL STATUS"
348 Indicates a willingness to send the client, upon
349 request, of the current status of all
350 .Tn TELNET
351 options.
352 .It "WILL TIMING-MARK"
353 Whenever a
354 .Dv DO TIMING-MARK
355 command is received, it is always responded
356 to with a
357 .Dv WILL TIMING-MARK
358 .It "WILL LOGOUT"
359 When a
360 .Dv DO LOGOUT
361 is received, a
362 .Dv WILL LOGOUT
363 is sent in response, and the
364 .Tn TELNET
365 session is shut down.
366 .It "WILL ENCRYPT"
367 Only sent if
368 .Nm telnetd
369 is compiled with support for data encryption, and
370 indicates a willingness to decrypt
371 the data stream.
372 .El
373 .Pp
374 .Nm Telnetd
375 has support for enabling remotely the following
376 .Tn TELNET
377 options:
378 .Bl -tag -width "DO AUTHENTICATION"
379 .It "DO BINARY"
380 Sent to indicate that
381 .Tn telnetd
382 is willing to receive an 8 bit data stream.
383 .It "DO LFLOW"
384 Requests that the client handle flow control
385 characters remotely.
386 .It "DO ECHO"
387 This is not really supported, but is sent to identify a 4.2BSD
388 .Xr telnet 1
389 client, which will improperly respond with
390 .Dv WILL ECHO .
391 If a
392 .Dv WILL ECHO
393 is received, a
394 .Dv DONT ECHO
395 will be sent in response.
396 .It "DO TERMINAL-TYPE"
397 Indicates a desire to be able to request the
398 name of the type of terminal that is attached
399 to the client side of the connection.
400 .It "DO SGA"
401 Indicates that it does not need to receive
402 .Dv IAC GA ,
403 the go ahead command.
404 .It "DO NAWS"
405 Requests that the client inform the server when
406 the window (display) size changes.
407 .It "DO TERMINAL-SPEED"
408 Indicates a desire to be able to request information
409 about the speed of the serial line to which
410 the client is attached.
411 .It "DO XDISPLOC"
412 Indicates a desire to be able to request the name
413 of the X windows display that is associated with
414 the telnet client.
415 .It "DO NEW-ENVIRON"
416 Indicates a desire to be able to request environment
417 variable information, as described in RFC 1572.
418 .It "DO ENVIRON"
419 Indicates a desire to be able to request environment
420 variable information, as described in RFC 1408.
421 .It "DO LINEMODE"
422 Only sent if
423 .Nm telnetd
424 is compiled with support for linemode, and
425 requests that the client do line by line processing.
426 .It "DO TIMING-MARK"
427 Only sent if
428 .Nm telnetd
429 is compiled with support for both linemode and
430 kludge linemode, and the client responded with
431 .Dv WONT LINEMODE .
432 If the client responds with
433 .Dv WILL TM ,
434 the it is assumed that the client supports
435 kludge linemode.
436 Note that the
437 .Op Fl k
438 option can be used to disable this.
439 .It "DO AUTHENTICATION"
440 Only sent if
441 .Nm telnetd
442 is compiled with support for authentication, and
443 indicates a willingness to receive authentication
444 information for automatic login.
445 .It "DO ENCRYPT"
446 Only sent if
447 .Nm telnetd
448 is compiled with support for data encryption, and
449 indicates a willingness to decrypt
450 the data stream.
451 .El
452 .Sh FILES
453 .Bl -tag -width /etc/services -compact
454 .It Pa /etc/services
455 .It Pa /etc/inittab
456 (UNICOS systems only)
457 .It Pa /etc/iptos
458 (if supported)
459 .El
460 .Sh "SEE ALSO"
461 .Xr telnet 1 ,
462 .Xr login 1
463 .Sh STANDARDS
464 .Bl -tag -compact -width RFC-1572
465 .It Cm RFC-854
466 .Tn TELNET
467 PROTOCOL SPECIFICATION
468 .It Cm RFC-855
469 TELNET OPTION SPECIFICATIONS
470 .It Cm RFC-856
471 TELNET BINARY TRANSMISSION
472 .It Cm RFC-857
473 TELNET ECHO OPTION
474 .It Cm RFC-858
475 TELNET SUPPRESS GO AHEAD OPTION
476 .It Cm RFC-859
477 TELNET STATUS OPTION
478 .It Cm RFC-860
479 TELNET TIMING MARK OPTION
480 .It Cm RFC-861
481 TELNET EXTENDED OPTIONS - LIST OPTION
482 .It Cm RFC-885
483 TELNET END OF RECORD OPTION
484 .It Cm RFC-1073
485 Telnet Window Size Option
486 .It Cm RFC-1079
487 Telnet Terminal Speed Option
488 .It Cm RFC-1091
489 Telnet Terminal-Type Option
490 .It Cm RFC-1096
491 Telnet X Display Location Option
492 .It Cm RFC-1123
493 Requirements for Internet Hosts -- Application and Support
494 .It Cm RFC-1184
495 Telnet Linemode Option
496 .It Cm RFC-1372
497 Telnet Remote Flow Control Option
498 .It Cm RFC-1416
499 Telnet Authentication Option
500 .It Cm RFC-1411
501 Telnet Authentication: Kerberos Version 4
502 .It Cm RFC-1412
503 Telnet Authentication: SPX
504 .It Cm RFC-1571
505 Telnet Environment Option Interoperability Issues
506 .It Cm RFC-1572
507 Telnet Environment Option
508 .El
509 .Sh BUGS
510 Some
511 .Tn TELNET
512 commands are only partially implemented.
513 .Pp
514 Because of bugs in the original 4.2 BSD
515 .Xr telnet 1 ,
516 .Nm telnetd
517 performs some dubious protocol exchanges to try to discover if the remote
518 client is, in fact, a 4.2 BSD
519 .Xr telnet 1 .
520 .Pp
521 Binary mode
522 has no common interpretation except between similar operating systems
523 (Unix in this case).
524 .Pp
525 The terminal type name received from the remote client is converted to
526 lower case.
527 .Pp
528 .Nm Telnetd
529 never sends
530 .Tn TELNET
531 .Dv IAC GA
532 (go ahead) commands.