*** empty log message ***
[heimdal.git] / appl / telnet / telnetd / telnetd.8
blobb26d8ddf16198c9eab93d700f0ec57485a03ff33
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 Ar port
54 .Sh DESCRIPTION
55 The
56 .Nm telnetd
57 command is a server which supports the
58 .Tn DARPA
59 standard
60 .Tn TELNET
61 virtual terminal protocol.
62 .Nm Telnetd
63 is normally invoked by the internet server (see
64 .Xr inetd 8 )
65 for requests to connect to the
66 .Tn TELNET
67 port as indicated by the
68 .Pa /etc/services
69 file (see
70 .Xr services 5 ) .
71 The
72 .Fl debug
73 option may be used to start up
74 .Nm telnetd
75 manually, instead of through
76 .Xr inetd 8 .
77 If started up this way, 
78 .Ar port
79 may be specified to run
80 .Nm telnetd
81 on an alternate
82 .Tn TCP
83 port number.
84 .Pp
85 The
86 .Nm telnetd
87 command accepts the following options:
88 .Bl -tag -width "-a authmode"
89 .It Fl a Ar authmode
90 This option may be used for specifying what mode should
91 be used for authentication.
92 Note that this option is only useful if
93 .Nm telnetd
94 has been compiled with support for the
95 .Dv AUTHENTICATION
96 option.
97 There are several valid values for
98 .Ar authmode:
99 .Bl -tag -width debug
100 .It debug
101 Turns on authentication debugging code.
102 .It user
103 Only allow connections when the remote user
104 can provide valid authentication information
105 to identify the remote user,
106 and is allowed access to the specified account
107 without providing a password.
108 .It valid
109 Only allow connections when the remote user
110 can provide valid authentication information
111 to identify the remote user.
113 .Xr login 1
114 command will provide any additional user verification
115 needed if the remote user is not allowed automatic
116 access to the specified account.
117 .It other
118 Only allow connections that supply some authentication information.
119 This option is currently not supported
120 by any of the existing authentication mechanisms,
121 and is thus the same as specifying
122 .Fl a
123 .Cm valid .
124 .It otp
125 Only allow authenticated connections (as with
126 .Fl a
127 .Cm user )
128 and also logins with one-time passwords (OTPs).  This option will call
129 login with an option so that only OTPs are accepted.  The user can of
130 course still type secret information at the prompt.
131 .It none
132 This is the default state.
133 Authentication information is not required.
134 If no or insufficient authentication information
135 is provided, then the
136 .Xr login 1
137 program will provide the necessary user
138 verification.
139 .It off
140 This disables the authentication code.
141 All user verification will happen through the
142 .Xr login 1
143 program.
145 .It Fl B
146 Ignored.
147 .It Fl D Ar debugmode
148 This option may be used for debugging purposes.
149 This allows
150 .Nm telnetd
151 to print out debugging information
152 to the connection, allowing the user to see what
153 .Nm telnetd
154 is doing.
155 There are several possible values for 
156 .Ar debugmode:
157 .Bl -tag -width exercise
158 .It Cm options
159 Prints information about the negotiation of
160 .Tn TELNET
161 options.
162 .It Cm report
163 Prints the 
164 .Cm options
165 information, plus some additional information
166 about what processing is going on.
167 .It Cm netdata
168 Displays the data stream received by
169 .Nm telnetd.
170 .It Cm ptydata
171 Displays data written to the pty.
172 .It Cm exercise
173 Has not been implemented yet.
175 .It Fl h
176 Disables the printing of host-specific information before
177 login has been completed.
178 .It Fl k
179 .It Fl l
180 Ignored.
181 .It Fl n
182 Disable
183 .Dv TCP
184 keep-alives.  Normally
185 .Nm telnetd
186 enables the
187 .Tn TCP
188 keep-alive mechanism to probe connections that
189 have been idle for some period of time to determine
190 if the client is still there, so that idle connections
191 from machines that have crashed or can no longer
192 be reached may be cleaned up.
193 .It Fl r Ar lowpty-highpty
194 This option is only enabled when
195 .Nm telnetd
196 is compiled for
197 .Dv UNICOS.
198 It specifies an inclusive range of pseudo-terminal devices to
199 use.  If the system has sysconf variable
200 .Dv _SC_CRAY_NPTY
201 configured, the default pty search range is 0 to
202 .Dv _SC_CRAY_NPTY;
203 otherwise, the default range is 0 to 128.  Either
204 .Ar lowpty
206 .Ar highpty
207 may be omitted to allow changing
208 either end of the search range.  If
209 .Ar lowpty
210 is omitted, the - character is still required so that
211 .Nm telnetd
212 can differentiate
213 .Ar highpty
214 from
215 .Ar lowpty .
216 .It Fl S Ar tos
217 .It Fl u Ar len
218 This option is used to specify the size of the field
219 in the
220 .Dv utmp
221 structure that holds the remote host name.
222 If the resolved host name is longer than
223 .Ar len ,
224 the dotted decimal value will be used instead.
225 This allows hosts with very long host names that
226 overflow this field to still be uniquely identified.
227 Specifying
228 .Fl u0
229 indicates that only dotted decimal addresses
230 should be put into the
231 .Pa utmp
232 file.
233 .ne 1i
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 pathname
253 Specify pathname to an alternative login program.
256 .Nm Telnetd
257 operates by allocating a pseudo-terminal device (see
258 .Xr pty 4 )
259 for a client, then creating a login process which has
260 the slave side of the pseudo-terminal as 
261 .Dv stdin ,
262 .Dv stdout
264 .Dv stderr .
265 .Nm Telnetd
266 manipulates the master side of the pseudo-terminal,
267 implementing the
268 .Tn TELNET
269 protocol and passing characters
270 between the remote client and the login process.
272 When a
273 .Tn TELNET
274 session is started up, 
275 .Nm telnetd
276 sends
277 .Tn TELNET
278 options to the client side indicating
279 a willingness to do the
280 following
281 .Tn TELNET
282 options, which are described in more detail below:
283 .Bd -literal -offset indent
284 DO AUTHENTICATION
285 WILL ENCRYPT
286 DO TERMINAL TYPE
287 DO TSPEED
288 DO XDISPLOC
289 DO NEW-ENVIRON
290 DO ENVIRON
291 WILL SUPPRESS GO AHEAD
292 DO ECHO
293 DO LINEMODE
294 DO NAWS
295 WILL STATUS
296 DO LFLOW
297 DO TIMING-MARK
300 The pseudo-terminal allocated to the client is configured
301 to operate in \*(lqcooked\*(rq mode, and with
302 .Dv XTABS and
303 .Dv CRMOD
304 enabled (see
305 .Xr tty 4 ) .
307 .Nm Telnetd
308 has support for enabling locally the following
309 .Tn TELNET
310 options:
311 .Bl -tag -width "DO AUTHENTICATION"
312 .It "WILL ECHO"
313 When the
314 .Dv LINEMODE
315 option is enabled, a
316 .Dv WILL ECHO
318 .Dv WONT ECHO
319 will be sent to the client to indicate the
320 current state of terminal echoing.
321 When terminal echo is not desired, a
322 .Dv WILL ECHO
323 is sent to indicate that
324 .Tn telnetd
325 will take care of echoing any data that needs to be
326 echoed to the terminal, and then nothing is echoed.
327 When terminal echo is desired, a
328 .Dv WONT ECHO
329 is sent to indicate that
330 .Tn telnetd
331 will not be doing any terminal echoing, so the
332 client should do any terminal echoing that is needed.
333 .It "WILL BINARY"
334 Indicates that the client is willing to send a
335 8 bits of data, rather than the normal 7 bits
336 of the Network Virtual Terminal.
337 .It "WILL SGA"
338 Indicates that it will not be sending
339 .Dv IAC GA,
340 go ahead, commands.
341 .It "WILL STATUS"
342 Indicates a willingness to send the client, upon
343 request, of the current status of all
344 .Tn TELNET
345 options.
346 .It "WILL TIMING-MARK"
347 Whenever a
348 .Dv DO TIMING-MARK
349 command is received, it is always responded
350 to with a
351 .Dv WILL TIMING-MARK
352 .ne 1i
353 .It "WILL LOGOUT"
354 When a
355 .Dv DO LOGOUT
356 is received, a
357 .Dv WILL LOGOUT
358 is sent in response, and the
359 .Tn TELNET
360 session is shut down.
361 .It "WILL ENCRYPT"
362 Only sent if
363 .Nm telnetd
364 is compiled with support for data encryption, and
365 indicates a willingness to decrypt
366 the data stream.
369 .Nm Telnetd
370 has support for enabling remotely the following
371 .Tn TELNET
372 options:
373 .Bl -tag -width "DO AUTHENTICATION"
374 .It "DO BINARY"
375 Sent to indicate that
376 .Tn telnetd
377 is willing to receive an 8 bit data stream.
378 .It "DO LFLOW"
379 Requests that the client handle flow control
380 characters remotely.
381 .It "DO ECHO"
382 This is not really supported, but is sent to identify a 4.2BSD
383 .Xr telnet 1
384 client, which will improperly respond with
385 .Dv WILL ECHO.
386 If a
387 .Dv WILL ECHO
388 is received, a
389 .Dv DONT ECHO
390 will be sent in response.
391 .It "DO TERMINAL-TYPE"
392 Indicates a desire to be able to request the
393 name of the type of terminal that is attached
394 to the client side of the connection.
395 .It "DO SGA"
396 Indicates that it does not need to receive
397 .Dv IAC GA,
398 the go ahead command.
399 .It "DO NAWS"
400 Requests that the client inform the server when
401 the window (display) size changes.
402 .It "DO TERMINAL-SPEED"
403 Indicates a desire to be able to request information
404 about the speed of the serial line to which
405 the client is attached.
406 .It "DO XDISPLOC"
407 Indicates a desire to be able to request the name
408 of the X windows display that is associated with
409 the telnet client.
410 .It "DO NEW-ENVIRON"
411 Indicates a desire to be able to request environment
412 variable information, as described in RFC 1572.
413 .It "DO ENVIRON"
414 Indicates a desire to be able to request environment
415 variable information, as described in RFC 1408.
416 .It "DO LINEMODE"
417 Only sent if
418 .Nm telnetd
419 is compiled with support for linemode, and
420 requests that the client do line by line processing.
421 .It "DO TIMING-MARK"
422 Only sent if
423 .Nm telnetd
424 is compiled with support for both linemode and
425 kludge linemode, and the client responded with
426 .Dv WONT LINEMODE.
427 If the client responds with
428 .Dv WILL TM,
429 the it is assumed that the client supports
430 kludge linemode.
431 Note that the
432 .Op Fl k
433 option can be used to disable this.
434 .It "DO AUTHENTICATION"
435 Only sent if
436 .Nm telnetd
437 is compiled with support for authentication, and
438 indicates a willingness to receive authentication
439 information for automatic login.
440 .It "DO ENCRYPT"
441 Only sent if
442 .Nm telnetd
443 is compiled with support for data encryption, and
444 indicates a willingness to decrypt
445 the data stream.
446 .Sh ENVIRONMENT
447 .Sh FILES
448 .Pa /etc/services
450 .Pa /etc/inittab
451 (UNICOS systems only)
453 .Pa /etc/iptos
454 (if supported)
456 .Sh "SEE ALSO"
457 .Xr telnet 1 ,
458 .Xr login 1
459 .Sh STANDARDS
460 .Bl -tag -compact -width RFC-1572
461 .It Cm RFC-854
462 .Tn TELNET
463 PROTOCOL SPECIFICATION
464 .It Cm RFC-855
465 TELNET OPTION SPECIFICATIONS
466 .It Cm RFC-856
467 TELNET BINARY TRANSMISSION
468 .It Cm RFC-857
469 TELNET ECHO OPTION
470 .It Cm RFC-858
471 TELNET SUPPRESS GO AHEAD OPTION
472 .It Cm RFC-859
473 TELNET STATUS OPTION
474 .It Cm RFC-860
475 TELNET TIMING MARK OPTION
476 .It Cm RFC-861
477 TELNET EXTENDED OPTIONS - LIST OPTION
478 .It Cm RFC-885
479 TELNET END OF RECORD OPTION
480 .It Cm RFC-1073
481 Telnet Window Size Option
482 .It Cm RFC-1079
483 Telnet Terminal Speed Option
484 .It Cm RFC-1091
485 Telnet Terminal-Type Option
486 .It Cm RFC-1096
487 Telnet X Display Location Option
488 .It Cm RFC-1123
489 Requirements for Internet Hosts -- Application and Support
490 .It Cm RFC-1184
491 Telnet Linemode Option
492 .It Cm RFC-1372
493 Telnet Remote Flow Control Option
494 .It Cm RFC-1416
495 Telnet Authentication Option
496 .It Cm RFC-1411
497 Telnet Authentication: Kerberos Version 4
498 .It Cm RFC-1412
499 Telnet Authentication: SPX
500 .It Cm RFC-1571
501 Telnet Environment Option Interoperability Issues
502 .It Cm RFC-1572
503 Telnet Environment Option
504 .Sh BUGS
505 Some
506 .Tn TELNET
507 commands are only partially implemented.
509 Because of bugs in the original 4.2 BSD
510 .Xr telnet 1 ,
511 .Nm telnetd
512 performs some dubious protocol exchanges to try to discover if the remote
513 client is, in fact, a 4.2 BSD
514 .Xr telnet 1 .
516 Binary mode
517 has no common interpretation except between similar operating systems
518 (Unix in this case).
520 The terminal type name received from the remote client is converted to
521 lower case.
523 .Nm Telnetd
524 never sends
525 .Tn TELNET
526 .Dv IAC GA
527 (go ahead) commands.