TELNETD(8)
πΈ NAME πΈ
okay so bestie, welcome to TELNETD(8) from the System Manager's Manual π. This page is all about telnetd β the DARPA TELNET protocol server. slay.
β¨ SYNOPSIS β¨
telnetd [-a authmode] [-B] [-D] [debugmode] [-e] [-h] [-Iinitid] [-l]
[-k] [-n] [-rlowpty-highpty] [-s] [-S tos] [-U] [-X authtype] [-w
[ip|maxhostlen[,[no]striplocal]]] [-debug [port]]
π¦ 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))). 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 command accepts the following options:
-aauthmode β this option may be used for specifying what mode should be used for authentication. Note that this option is only useful iftelnetdhas been compiled with support for theAUTHENTICATIONoption. There are several valid values for authmode:debugβ turns on authentication debugging code. πvalidβ 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.userβ only allow connections when the remote user can provide valid authentication information to identify the remote user. Thelogin(1)command will provide any additional user verification needed if the remote user is not allowed automatic access to the specified account.otherβ 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.noneβ this is the default state. Authentication information is not required. If no or insufficient authentication information is provided, then thelogin(1)program will provide the necessary user verification.offβ this disables the authentication code. All user verification will happen through thelogin(1)program.
-Bβ specifies bftp server mode. In this mode,telnetdcauses login to start abftp(1)session rather than the user's normal shell. In bftp daemon mode, normal logins are not supported, and it must be used on a port other than the normal TELNET port. π-Ddebugmode β this option may be used for debugging purposes. This allowstelnetdto print out debugging information to the connection, allowing the user to see whattelnetdis doing. There are several possible values for debugmode:optionsβ prints information about the negotiation of TELNET options.reportβ prints the options information, plus some additional information about what processing is going on.netdataβ displays the data stream received bytelnetd.ptydataβ displays data written to the pty.encryptβ enables encryption debugging code.exerciseβ has not been implemented yet. π
-debugβ enables debugging on each socket created bytelnetd(seeSO_DEBUGinsocket(2)). π₯-eβ this option causestelnetdto refuse unencrypted connections. π«-hβ disables the printing of host-specific information before login has been completed.-Iinitid β this option is only applicable to UNICOS systems prior to 7.0. It specifies the ID from/etc/inittabto use when init starts login sessions. The default ID isfe.-kβ this option is only useful iftelnetdhas been compiled with both linemode and kludge linemode support. If the-koption is specified, then if the remote client does not support theLINEMODEoption, thentelnetdwill operate in character at a time mode. It will still support kludge linemode, but will only go into kludge linemode if the remote client requests it. (This is done by the client sendingDONT SUPPRESS-GO-AHEADandDONT ECHO.) The-koption is most useful when there are remote clients that do not support kludge linemode, but pass the heuristic (if they respond withWILL TIMING-MARKin response to aDO TIMING-MARK) for kludge linemode support. π§-lβ specifies line mode. Tries to force clients to use line-at-a-time mode. If theLINEMODEoption is not supported, it will go into kludge linemode.-nβ disable TCP keep-alives. Normallytelnetdenables 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. π«Ά-rlowpty-highpty β this option is only enabled whentelnetdis compiled for UNICOS. It specifies an inclusive range of pseudo-terminal devices to use. If the system has sysconf variable_SC_CRAY_NPTYconfigured, the default pty search range is0to_SC_CRAY_NPTY; otherwise, the default range is0to128. Either lowpty or highpty may be omitted to allow changing either end of the search range. If lowpty is omitted, the-character is still required so thattelnetdcan differentiate highpty from lowpty.-sβ this option is only enabled iftelnetdis compiled with support for SecurID cards. It causes the-soption to be passed on tologin(1), and thus is only useful iflogin(1)supports the-sflag to indicate that only SecurID validated logins are allowed, and is usually useful for controlling remote logins from outside of a firewall. π-Stos β the page lists this one but gives no description here, bestie.-Uβ this option causestelnetdto refuse connections from addresses that cannot be mapped back into a symbolic name via thegethostbyaddr(3)routine. π-w[ip|maxhostlen[,[no]striplocal]]β controls the form of the remote hostname passed tologin(1). Specifyingipresults in the numeric IP address always being passed tologin(1). Specifying a number, maxhostlen, sets the maximum length of the hostname passed tologin(1)before it will be passed as a numeric IP address. If maxhostlen is0, then the system default, as determined by theutmporutmpxstructures, is used. Thenostriplocalandstriplocaloptions, which must be preceded by a comma, control whether or not the local host domain is stripped from the remote hostname. By default, the equivalent ofstriplocalis in effect. π-Xauthtype β this option is only valid iftelnetdhas 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 recompiletelnetd.
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 theLINEMODEoption is enabled, aWILL ECHOorWONT ECHOwill be sent to the client to indicate the current state of terminal echoing. When terminal echo is not desired, aWILL ECHOis sent to indicate thattelnetdwill take care of echoing any data that needs to be echoed to the terminal, and then nothing is echoed. When terminal echo is desired, aWONT ECHOis sent to indicate thattelnetdwill 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 8 bits of data, rather than the normal 7 bits of the Network Virtual Terminal.WILL SGAβ indicates that it will not be sendingIAC GA, go ahead, commands.WILL STATUSβ indicates a willingness to send the client, upon request, the current status of all TELNET options.WILL TIMING-MARKβ whenever aDO TIMING-MARKcommand is received, it is always responded to with aWILL TIMING-MARK. βWILL LOGOUTβ when aDO LOGOUTis received, aWILL LOGOUTis sent in response, and the TELNET session is shut down.WILL ENCRYPTβ only sent iftelnetdis 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 thattelnetdis 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.2BSDtelnet(1)client, which will improperly respond withWILL ECHO. If aWILL ECHOis received, aDONT ECHOwill be sent in response. πDO TERMINAL-TYPEβ lowkey just saying "hey, I'd love to be able to ask what kind of terminal is hooked up on the client side of this connection π "DO SGAβ it's telling you it does not need to receiveIAC GA, like, the go ahead command? not needed bestie, skip it β¨DO NAWSβ requests that the client let the server know whenever the window (display) size changes, so nobody's vibes get cropped πͺDO TERMINAL-SPEEDβ indicates a desire to be able to request info about the speed of the serial line the client is attached to πββοΈπ¨DO XDISPLOCβ indicates a desire to be able to ask for the name of the X windows display that's associated with the telnet client π₯οΈDO NEW-ENVIRONβ indicates a desire to be able to request environment variable information, exactly as described inRFC 1572π±DO ENVIRONβ same energy, but for the older flavour: a desire to request environment variable information, as described inRFC 1408πΏDO LINEMODEβ only sent iftelnetdwas compiled with support for linemode, and it's requesting that the client do line by line processing πDO TIMING-MARKβ only sent iftelnetdis compiled with support for both linemode and kludge linemode, and the client responded withWONT LINEMODE. If the client comes back withWILL TM, then it's assumed that the client supports kludge linemode π°οΈ. ngl, the-koption can be used to disable this whole situation.DO AUTHENTICATIONβ only sent iftelnetdis compiled with support for authentication, and it signals a willingness to receive authentication information for automatic login πDO ENCRYPTβ only sent iftelnetdis compiled with support for data encryption, and it signals a willingness to decrypt the data stream π‘οΈ
π FILES π
/etc/services/etc/inittab(UNICOS systems only)/etc/iptos(if supported)/usr/ucb/bftp(if supported)
π SEE ALSO π
telnet(1), login(1), bftp(1) (if supported)
go read those, iykyk π«Ά
β STANDARDS β
RFC-854β TELNET PROTOCOL SPECIFICATIONRFC-855β TELNET OPTION SPECIFICATIONSRFC-856β TELNET BINARY TRANSMISSIONRFC-857β TELNET ECHO OPTIONRFC-858β TELNET SUPPRESS GO AHEAD OPTIONRFC-859β TELNET STATUS OPTIONRFC-860β TELNET TIMING MARK OPTIONRFC-861β TELNET EXTENDED OPTIONS - LIST OPTIONRFC-885β TELNET END OF RECORD OPTIONRFC-1073β Telnet Window Size OptionRFC-1079β Telnet Terminal Speed OptionRFC-1091β Telnet Terminal-Type OptionRFC-1096β Telnet X Display Location OptionRFC-1123β Requirements for Internet Hosts -- Application and SupportRFC-1184β Telnet Linemode OptionRFC-1372β Telnet Remote Flow Control OptionRFC-1416β Telnet Authentication OptionRFC-1411β Telnet Authentication: Kerberos Version 4RFC-1412β Telnet Authentication: SPXRFC-1571β Telnet Environment Option Interoperability IssuesRFC-1572β Telnet Environment Option
that's a whole reading list, bestie β bring a snack π
π BUGS π
Some TELNET commands are only partially implemented. not fully baked, bestie, sorry π
Because of bugs in the original 4.2 BSDtelnet(1),telnetdperforms some dubious protocol exchanges to try to discover if the remote client is, in fact, a 4.2 BSDtelnet(1). it's giving detective work nobody asked for π
Binary mode has no common interpretation except between similar operating systems (Unix in this case). fr fr, don't assume it'll play nice across totally different systems.
The terminal type name received from the remote client is converted to lower case. yeah. it just does that. π‘
Telnetd never sends TELNET IAC GA (go ahead) commands. never ever, periodt. π
and that's the whole page, bestie! π this was TELNETD(8), dated TELNETD(8) in the footer β mwah, go forth and telnet responsibly πβ¨π¦
π¦ where this page comes from
- opensuse-leap 16.0: krb5-appl-servers 1.0.3-bp160.2.1 Β· MIT
- opensuse-leap 16.0: krb5-appl-servers 1.0.3-bp160.2.1 Β· MIT
- opensuse-leap 16.0: krb5-appl-servers 1.0.3-bp160.2.1 Β· MIT
- opensuse-leap 16.0: krb5-appl-servers 1.0.3-bp160.2.1 Β· MIT
- Copyright (c) 1983, 1993 The Regents of the University of California. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms