TELNETD(8) BSD System Manager’s Manual TELNETD(8)
telnetd − DARPA telnet protocol server
/usr/sbin/in.telnetd [−hns] [−a authmode] [−D debugmode] [−L loginprg] [−S tos] [−X authtype] [−edebug] [−debug port]
The telnetd program is a server which supports the DARPA telnet interactive communication protocol. Telnetd is normally invoked by the internet server (see inetd(8)) for requests to connect to the telnet port as indicated by the /etc/services file (see services(5)). The −debug option may be used to start up telnetd manually, instead of through inetd(8). If started up this way, port may be specified to run telnetd on an alternate TCP port number.
The telnetd program accepts the following options:
This option may be used for specifying what mode should be used for authentication. Note that this option is only useful if telnetd has been compiled with support for authentication, which is not available in the current version. The following values of authmode are understood:
off’ This disables the authentication code. All user verification will happen through the login(1) program.
report’ Prints the options information, plus some additional information about what processing is going on.
−edebug’ If telnetd has been compiled with support for encryption, then the −edebug option may be used to enable encryption debugging code.
−h’ Disables the printing of host-specific information before login has been completed.
−n’ Disable TCP keep-alives. Normally telnetd enables the TCP keep-alive mechanism to probe connections that have been idle for some period of time to determine if the client is still there, so that idle connections from machines that have crashed or can no longer be reached may be cleaned up.
−s’ This option is only enabled if telnetd is compiled with support for SecurID cards. It causes the −s option to be passed on to login(1), and thus is only useful if login(1) supports the −s flag to indicate that only SecurID validated logins are allowed. This is usually useful for controlling remote logins from outside of a firewall.
−S tos’ Sets the IP type-of-service (TOS) option for the telnet connection to the value tos.
If the file /etc/issue.net is present, telnetd will display its contents before the login prompt of a telnet session (see issue.net(5)).
Telnetd operates by allocating a pseudo-terminal device (see pty(4)) for a client, then creating a login process which has the slave side of the pseudo-terminal as stdin, stdout, and stderr. Telnetd manipulates the master side of the pseudo-terminal, implementing the telnet protocol and passing characters between the remote client and the login process.
When a telnet session is started up, telnetd sends telnet options to the client side indicating a willingness to do the following telnet options, which are described in more detail below:
The pseudo-terminal allocated to the client is configured to operate in cooked mode, and with XTABS CRMOD enabled (see tty(4)).
Telnetd has support for enabling locally the following telnet options:
WILL ECHO’ When the LINEMODE option is enabled, a WILLECHO or WONT ECHO will be sent to the client toindicate the current state of terminal echoing. Whenterminal echo is not desired, a WILL ECHO is sent toindicate that telnetd will take care of echoing anydata that needs to be echoed to the terminal, and thennothing is echoed. When terminal echo is desired, aWONT ECHO is sent to indicate that telnetd will not bedoing any terminal echoing, so the client should doany terminal echoing that is needed.
WILL BINARY’ Indicates that the client is willing to send a 8 bits of data, rather than the normal 7 bits of the Network Virtual Terminal.
WILL SGA’ Indicates that it will not be sending IAC GA, go ahead, commands.
WILL STATUS’ Indicates a willingness to send the client, upon request, of the current status of all TELNET options.
WILL LOGOUT’ When a DO LOGOUT is received, a WILL LOGOUT is sent in response, and the TELNET session is shut down.
WILL ENCRYPT’ Only sent if telnetd is compiled with support for data encryption, and indicates a willingness to decrypt the data stream.
Telnetd has support for enabling remotely the following TELNET options:
DO BINARY’ Sent to indicate that telnetd is willing to receive an 8 bit data stream.
DO LFLOW’ Requests that the client handle flow control characters remotely.
DO ECHO’ This is not really supported, but is sent to identify a 4.2BSD telnet(1) client, which will improperly respond with WILL ECHO. If a WILL ECHO is received, a DONT ECHO will be sent in response.
DO SGA’ Indicates that it does not need to receive IAC GA, the go ahead command.
DO NAWS’ Requests that the client inform the server when the window (display) size changes.
DO XDISPLOC’ Indicates a desire to be able to request the name of the X windows display that is associated with the telnet client.
DO NEW-ENVIRON’ Indicates a desire to be able to request environment variable information, as described in RFC 1572.
DO ENVIRON’ Indicates a desire to be able to request environment variable information, as described in RFC 1408.
DO LINEMODE’ Only sent if telnetd is compiled with support for linemode, and requests that the client do line by line processing.
DO TIMING-MARK’ Only sent if telnetd is compiled with support for both linemode and kludge linemode, and the client responded with WONT LINEMODE. If the client responds with WILL TM, the it is assumed that the client supports kludge linemode. Note that the [−k] option can be used to disable this.
DO ENCRYPT’ Only sent if telnetd is compiled with support for data encryption, and indicates a willingness to decrypt the data stream. issue.net(5)).
telnet(1), login(1), issue.net(5),
TELNET PROTOCOL SPECIFICATION
Some TELNET commands are only partially implemented.
Because of bugs in the original 4.2 BSD telnet(1), telnetd performs some dubious protocol exchanges to try to discover if the remote client is, in fact, a 4.2 BSD telnet(1).
Binary mode has no common interpretation except between similar operating systems (Unix in this case).
The terminal type name received from the remote client is converted to lower case.
Telnetd never sends TELNET IAC GA (go ahead) commands.
The source code is not comprehensible.
Linux NetKit (0.17) December 29, 1996 Linux NetKit (0.17)