Scroll to navigation

TELNETD(8) System Manager's Manual (smm) TELNETD(8)

NAME

telnetd
DARPA TELNET protocol server

SYNOPSIS

telnetd [options ...]

DESCRIPTION

The telnetd command is a server which supports the DARPA standard TELNET virtual terminal 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)).

OPTIONS

The telnetd command accepts the following options:
, --authmode authmode
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 the AUTHENTICATION option. There are several valid values for authmode:
Only allow connections when the remote user can provide valid authentication information to identify the remote user, and is allowed access to the specified account without providing a password.
Only allow connections when the remote user can provide valid authentication information to identify the remote user. The login(1) command will provide any additional user verification needed if the remote user is not allowed automatic access to the specified account.
Only allow connections that supply some authentication information. This option is currently not supported by any of the existing authentication mechanisms, and is thus the same as specifying -a valid.
This is the default state. Authentication information is not required. If no or insufficient authentication information is provided, then the login(1) program will provide the necessary user verification.
This disables the authentication code. All user verification will happen through the login(1) program.
, --server-principal name
Set the Kerberos principal name for this server instance, with or without an explicit realm.
, --disable-auth-type authtype
This option is only valid if telnetd has been built with support for the authentication option. It disables the use of authtype authentication, and can be used to temporarily disable a specific authentication type without having to recompile telnetd.
, --debug [debugmode]
This option may be used for debugging purposes. This allows telnetd to print out debugging information to the connection, allowing the user to see what telnetd is doing. There are several possible values for debugmode:
Prints information about the negotiation of TELNET options.
Prints the options information, plus some additional information about what processing is going on.
Displays the data stream received by telnetd.
Displays data written to the pty.
Displays authentication information.
Displays encryption information.
, --exec-login string
Set the program to be executed instead of /bin/login.
, --no-hostinfo
Disables the printing of host-specific information before login has been completed.
, --linemode [mode]
Specifies line mode. Tries to force clients to use line- at-a-time mode. If mode is nokludge, then automatic klugde linemode will be disabled. If the LINEMODE option is not supported, it will go into kludge linemode.
, --no-keepalive
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.
, --reverse-lookup
This option causes telnetd to refuse connections from addresses that cannot be mapped back into a symbolic name via the gethostbyaddr(3) routine.
-?, --help
Display a help list.
Display a short usage message.
, --version
Display program version.

OPERATION

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:

DO AUTHENTICATION
WILL ENCRYPT
DO TERMINAL TYPE
DO TSPEED
DO XDISPLOC
DO NEW-ENVIRON
DO ENVIRON
WILL SUPPRESS GO AHEAD
DO ECHO
DO LINEMODE
DO NAWS
WILL STATUS
DO LFLOW
DO TIMING-MARK

The pseudo-terminal allocated to the client is configured to operate in “cooked” mode, and with XTABS and CRMOD enabled (see tty(4)).

telnetd has support for enabling locally the following TELNET options:

WILL ECHO
When the LINEMODE option is enabled, a WILL ECHO or WONT ECHO will be sent to the client to indicate the current state of terminal echoing. When terminal echo is not desired, a WILL ECHO is sent to indicate that telnetd will take care of echoing any data that needs to be echoed to the terminal, and then nothing is echoed. When terminal echo is desired, a WONT ECHO is sent to indicate that telnetd will not be doing any terminal echoing, so the client should do any 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 TIMING-MARK
Whenever a DO TIMING-MARK command is received, it is always responded to with a WILL TIMING-MARK
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 TERMINAL-TYPE
Indicates a desire to be able to request the name of the type of terminal that is attached to the client side of the connection.
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 TERMINAL-SPEED
Indicates a desire to be able to request information about the speed of the serial line to which the client is attached.
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 AUTHENTICATION
Only sent if telnetd is compiled with support for authentication, and indicates a willingness to receive authentication information for automatic login.
DO ENCRYPT
Only sent if telnetd is compiled with support for data encryption, and indicates a willingness to decrypt the data stream.

FILES

/etc/services

SEE ALSO

telnet(1), login(1), bftp(1) (if supported)

STANDARDS

TELNET PROTOCOL SPECIFICATION
TELNET OPTION SPECIFICATIONS
TELNET BINARY TRANSMISSION
TELNET ECHO OPTION
TELNET SUPPRESS GO AHEAD OPTION
TELNET STATUS OPTION
TELNET TIMING MARK OPTION
TELNET EXTENDED OPTIONS - LIST OPTION
TELNET END OF RECORD OPTION
Telnet Window Size Option
Telnet Terminal Speed Option
Telnet Terminal-Type Option
Telnet X Display Location Option
Requirements for Internet Hosts -- Application and Support
Telnet Linemode Option
Telnet Remote Flow Control Option
Telnet Authentication Option
Telnet Authentication: Kerberos Version 4
Telnet Authentication: SPX
Telnet Environment Option Interoperability Issues
Telnet Environment Option

BUGS

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.

February 9, 2019 GNU Network Utilities