📄 telnetd.8
字号:
.\" Copyright (c) 1983 The Regents of the University of California..\" All rights reserved..\".\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 1. Redistributions of source code must retain the above copyright.\" notice, this list of conditions and the following disclaimer..\" 2. Redistributions in binary form must reproduce the above copyright.\" notice, this list of conditions and the following disclaimer in the.\" documentation and/or other materials provided with the distribution..\" 3. All advertising materials mentioning features or use of this software.\" must display the following acknowledgement:.\" This product includes software developed by the University of.\" California, Berkeley and its contributors..\" 4. Neither the name of the University nor the names of its contributors.\" may be used to endorse or promote products derived from this software.\" without specific prior written permission..\".\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF.\" SUCH DAMAGE..\".\" from: @(#)telnetd.8 6.8 (Berkeley) 4/20/91.\" $Id: telnetd.8,v 1.18 2000/07/30 23:57:10 dholland Exp $.\".Dd December 29, 1996.Dt TELNETD 8.Os "Linux NetKit (0.17)".Sh NAME.Nm telnetd.Nd DARPA.Tn telnetprotocol server.Sh SYNOPSIS.Nm /usr/sbin/in.telnetd.Op Fl hns.Op Fl a Ar authmode.Op Fl D Ar debugmode.Op Fl L Ar loginprg.Op Fl S Ar tos.Op Fl X Ar authtype.Op Fl edebug.Op Fl debug Ar port.Sh DESCRIPTIONThe.Nm telnetdprogram is a server which supports the .Tn DARPA.Tn telnetinteractive communication protocol..Nm Telnetdis normally invoked by the internet server (see.Xr inetd 8 )for requests to connect to the.Tn telnetport as indicated by the.Pa /etc/servicesfile (see.Xr services 5 ) .The.Fl debugoption may be used to start up .Nm telnetdmanually, instead of through.Xr inetd 8 .If started up this way, .Ar portmay be specified to run .Nm telnetdon an alternate .Tn TCP port number..PpThe .Nm telnetdprogram accepts the following options:.Bl -tag -width "-a authmode".It Fl a Ar authmodeThis option may be used for specifying what mode shouldbe used for authentication.Note that this option is only useful if.Nm telnetdhas been compiled with support for authentication, which is notavailable in the current version. The following values of.Ar authmode are understood:.Bl -tag -width debug.It debugTurns on authentication debugging code..It userOnly allow connections when the remote user can provide validauthentication information to identify the remote user, and is allowedaccess to the specified account without providing a password..It validOnly allow connections when the remote user can provide validauthentication information to identify the remote user. The.Xr login 1command will provide any additional user verification needed if theremote user is not allowed automatic access to the specified account..It otherOnly allow connections that supply some authentication information.This option is currently not supported by any of the existingauthentication mechanisms, and is thus the same as specifying.Cm valid ..It noneThis is the default state. Authentication information is notrequired. If no or insufficient authentication information isprovided, then the.Xr login 1program will provide the necessary user verification..It offThis disables the authentication code. All user verification willhappen through the.Xr login 1program..El.It Fl D Ar debugmodeThis option may be used for debugging purposes. This allows.Nm telnetdto print out debugging information to the connection, allowing theuser to see what.Nm telnetdis doing. There are several possible values for.Ar debugmode:.Bl -tag -width exercise.It Cm optionsPrints information about the negotiation of.Tn telnetoptions..It Cm reportPrints the .Cm optionsinformation, plus some additional information about what processing isgoing on..It Cm netdataDisplays the data stream received by.Nm telnetd..It Cm ptydataDisplays data written to the pty..It Cm exerciseHas not been implemented yet..El.It Fl edebugIf.Nm telnetdhas been compiled with support for encryption, then the.Fl edebugoption may be used to enable encryption debugging code..It Fl hDisables the printing of host-specific information beforelogin has been completed..It Fl L Ar loginprgThis option may be used to specify a different login program.By default, .Pa /bin/loginis used..It Fl nDisable.Dv TCPkeep-alives. Normally.Nm telnetdenables the.Tn TCPkeep-alive mechanism to probe connections thathave been idle for some period of time to determineif the client is still there, so that idle connectionsfrom machines that have crashed or can no longerbe reached may be cleaned up..It Fl sThis option is only enabled if.Nm telnetdis compiled with support for.Tn SecurIDcards.It causes the.Fl soption to be passed on to.Xr login 1 ,and thus is only useful if.Xr login 1supports the.Fl sflag to indicate that only.Tn SecurIDvalidated logins are allowed. This is usually useful for controllingremote logins from outside of a firewall..It Fl S Ar tosSets the IP type-of-service (TOS) option for the telnetconnection to the value.Ar tos ..It Fl X Ar authtypeThis option is only valid if.Nm telnetdhas been built with support for the authentication option.It disables the use of.Ar authtypeauthentication, andcan be used to temporarily disablea specific authentication type without having to recompile.Nm telnetd ..El.PpIf the file.Pa /etc/issue.netis present,.Nm telnetdwill display its contents before the login prompt of a telnet session (see.Xr issue.net 5 ) ..Pp.Nm Telnetdoperates by allocating a pseudo-terminal device (see.Xr pty 4 )for a client, then creating a login process which hasthe slave side of the pseudo-terminal as .Dv stdin ,.Dv stdout ,and.Dv stderr ..Nm Telnetdmanipulates the master side of the pseudo-terminal,implementing the.Tn telnetprotocol and passing charactersbetween the remote client and the login process..PpWhen a.Tn telnetsession is started up, .Nm telnetdsends.Tn telnetoptions to the client side indicatinga willingness to do thefollowing.Tn telnetoptions, which are described in more detail below:.Bd -literal -offset indentDO AUTHENTICATIONWILL ENCRYPTDO TERMINAL TYPEDO TSPEEDDO XDISPLOCDO NEW-ENVIRONDO ENVIRONWILL SUPPRESS GO AHEADDO ECHODO LINEMODEDO NAWSWILL STATUSDO LFLOWDO TIMING-MARK.Ed.PpThe pseudo-terminal allocated to the client is configuredto operate in \*(lqcooked\*(rq mode, and with .Dv XTABS.Dv CRMODenabled (see.Xr tty 4 ) ..Pp.Nm Telnetdhas support for enabling locally the following.Tn telnetoptions:.Bl -tag -width "DO AUTHENTICATION".It "WILL ECHO"When the.Dv LINEMODEoption is enabled, a.Dv WILL ECHOor.Dv WONT ECHOwill be sent to the client to indicate thecurrent state of terminal echoing.When terminal echo is not desired, a.Dv WILL ECHOis sent to indicate that.Tn telnetdwill take care of echoing any data that needs to beechoed to the terminal, and then nothing is echoed.When terminal echo is desired, a.Dv WONT ECHOis sent to indicate that.Tn telnetdwill not be doing any terminal echoing, so theclient should do any terminal echoing that is needed..It "WILL BINARY"Indicates that the client is willing to send a8 bits of data, rather than the normal 7 bitsof the Network Virtual Terminal..It "WILL SGA"Indicates that it will not be sending.Dv IAC GA,go ahead, commands..It "WILL STATUS"Indicates a willingness to send the client, uponrequest, of the current status of all.Tn TELNEToptions..It "WILL TIMING-MARK"Whenever a.Dv DO TIMING-MARKcommand is received, it is always respondedto with a.Dv WILL TIMING-MARK.It "WILL LOGOUT"When a.Dv DO LOGOUTis received, a.Dv WILL LOGOUTis sent in response, and the.Tn TELNETsession is shut down..It "WILL ENCRYPT"Only sent if.Nm telnetdis compiled with support for data encryption, andindicates a willingness to decryptthe data stream..El.Pp.Nm Telnetdhas support for enabling remotely the following.Tn TELNEToptions:.Bl -tag -width "DO AUTHENTICATION".It "DO BINARY"Sent to indicate that.Tn telnetdis willing to receive an 8 bit data stream..It "DO LFLOW"Requests that the client handle flow controlcharacters remotely..It "DO ECHO"This is not really supported, but is sent to identify a 4.2BSD.Xr telnet 1client, which will improperly respond with.Dv WILL ECHO.If a.Dv WILL ECHOis received, a.Dv DONT ECHOwill be sent in response..It "DO TERMINAL-TYPE"Indicates a desire to be able to request thename of the type of terminal that is attachedto the client side of the connection..It "DO SGA"Indicates that it does not need to receive.Dv IAC GA,the go ahead command..It "DO NAWS"Requests that the client inform the server whenthe window (display) size changes..It "DO TERMINAL-SPEED"Indicates a desire to be able to request informationabout the speed of the serial line to whichthe client is attached..It "DO XDISPLOC"Indicates a desire to be able to request the nameof the X windows display that is associated withthe telnet client..It "DO NEW-ENVIRON"Indicates a desire to be able to request environmentvariable information, as described in RFC 1572..It "DO ENVIRON"Indicates a desire to be able to request environmentvariable information, as described in RFC 1408..It "DO LINEMODE"Only sent if.Nm telnetdis compiled with support for linemode, andrequests that the client do line by line processing..It "DO TIMING-MARK"Only sent if.Nm telnetdis compiled with support for both linemode andkludge linemode, and the client responded with.Dv WONT LINEMODE.If the client responds with.Dv WILL TM,the it is assumed that the client supportskludge linemode.Note that the.Op Fl koption can be used to disable this..It "DO AUTHENTICATION"Only sent if.Nm telnetdis compiled with support for authentication, andindicates a willingness to receive authenticationinformation for automatic login..It "DO ENCRYPT"Only sent if.Nm telnetdis compiled with support for data encryption, andindicates a willingness to decryptthe data stream..Xr issue.net 5 ) ..Sh FILES.Pa /etc/services ,.Pa /etc/issue.net.Sh "SEE ALSO".Xr telnet 1 ,.Xr login 1 ,.Xr issue.net 5 ,.Sh STANDARDS.Bl -tag -compact -width RFC-1572.It Cm RFC-854.Tn TELNETPROTOCOL SPECIFICATION.It Cm RFC-855TELNET OPTION SPECIFICATIONS.It Cm RFC-856TELNET BINARY TRANSMISSION.It Cm RFC-857TELNET ECHO OPTION.It Cm RFC-858TELNET SUPPRESS GO AHEAD OPTION.It Cm RFC-859TELNET STATUS OPTION.It Cm RFC-860TELNET TIMING MARK OPTION.It Cm RFC-861TELNET EXTENDED OPTIONS - LIST OPTION.It Cm RFC-885TELNET END OF RECORD OPTION.It Cm RFC-1073Telnet Window Size Option.It Cm RFC-1079Telnet Terminal Speed Option.It Cm RFC-1091Telnet Terminal-Type Option.It Cm RFC-1096Telnet X Display Location Option.It Cm RFC-1123Requirements for Internet Hosts -- Application and Support.It Cm RFC-1184Telnet Linemode Option.It Cm RFC-1372Telnet Remote Flow Control Option.It Cm RFC-1416Telnet Authentication Option.It Cm RFC-1411Telnet Authentication: Kerberos Version 4.It Cm RFC-1412Telnet Authentication: SPX.It Cm RFC-1571Telnet Environment Option Interoperability Issues.It Cm RFC-1572Telnet Environment Option.Sh BUGSSome.Tn TELNETcommands are only partially implemented..PpBecause of bugs in the original 4.2 BSD.Xr telnet 1 ,.Nm telnetdperforms some dubious protocol exchanges to try to discover if the remoteclient is, in fact, a 4.2 BSD.Xr telnet 1 ..PpBinary modehas no common interpretation except between similar operating systems(Unix in this case)..PpThe terminal type name received from the remote client is converted tolower case..Pp.Nm Telnetdnever sends.Tn TELNET.Dv IAC GA(go ahead) commands..PpThe source code is not comprehensible.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -