📄 telnetd.8.txt
字号:
.\" $OpenBSD: telnetd.8,v 1.33 2003/08/08 09:26:03 jmc Exp $.\".\" Copyright (c) 1983, 1993.\" 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. 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..\".\" @(#)telnetd.8 8.4 (Berkeley) 6/1/94.\".Dd June 1, 1994.Dt TELNETD 8.Os.Sh NAME.Nm telnetd.Nd DARPA.Tn TELNETprotocol server.Sh SYNOPSIS.Nm telnetd.Bk -words.Op Fl BUhkln.Op Fl D Ar debugmode.Op Fl S Ar tos.Op Fl X Ar authtype.Op Fl a Ar authmode.Op Fl g Ar gettyent.Op Fl r Ar lowpty-highpty.Op Fl u Ar len.Op Fl debug.Op Fl L Ar /bin/login.Op Fl y.Op Ar port.Ek.Sh DESCRIPTIONThe.Nm telnetdcommand is a server which supports the.Tn DARPAstandard.Tn TELNETvirtual terminal 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 TCPport number..PpThe.Nm telnetdcommand 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 Kerberos authentication.Note that this option is only useful if.Nm telnetdhas been compiled with support for the.Dv AUTHENTICATIONoption.There are several valid values for.Ar authmode :.Bl -tag -width debug.It debugTurns on authentication debugging code..It userOnly allow connections when the remote usercan provide valid Kerberos authentication informationto identify the remote user,and is allowed access to the specified accountwithout providing a password..It validOnly allow connections when the remote usercan provide valid Kerberos authentication informationto identify the remote user.The.Xr login 1command will provide any additional user verificationneeded if the remote user is not allowed automaticaccess to the specified account..It otherOnly allow connections that supply some authentication information.This option is currently not supportedby any of the existing authentication mechanisms,and is thus the same as specifying.Fl a.Cm valid ..\" .It otp.\" Only allow Kerberos authenticated connections (as with.\" .Fl a.\" .Cm user ).\" and also logins with one-time passwords (OTPs)..\" This option will call login with an option so that only OTPs are accepted..\" The user can of course still type secret information at the prompt..It noneThis is the default state.Kerberos authentication information is not required.If no or insufficient authentication informationis provided, then traditional cleartext passwords will be used..It offThis disables the authentication code, and cleartext password will be used..El.It Fl BIgnored..It Fl D Ar debugmodeThis option may be used for debugging purposes.This allows.Nm telnetdto print out debugging informationto the connection, allowing the user 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 informationabout what processing is going 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 hDisables the printing of host-specific information beforelogin has been completed..It Fl lIgnored..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 g Ar gettyentSpecifies which entry from.Pa /etc/gettytabshould be used to get banner strings, login program and other information.The default entry is.Dq default..It Fl r Ar lowpty-highptyThis option is only enabled when.Nm telnetdis compiled for.Dv UNICOS .It specifies an inclusive range of pseudo-terminal devices touse.If the system has sysconf variable.Dv _SC_CRAY_NPTYconfigured, the default pty search range is 0 to.Dv _SC_CRAY_NPTY ;otherwise, the default range is 0 to 128.Either.Ar lowptyor.Ar highptymay be omitted to allow changingeither end of the search range.If.Ar lowptyis omitted, the - character is still required so that.Nm telnetdcan differentiate.Ar highptyfrom.Ar lowpty ..It Fl S Ar tos.It Fl u Ar lenThis option is used to specify the size of the fieldin the.Dv utmpstructure that holds the remote host name.If the resolved host name is longer than.Ar len ,the dotted decimal value will be used instead.This allows hosts with very long host names thatoverflow this field to still be uniquely identified.Specifying.Fl u0indicates that only dotted decimal addressesshould be put into the.Pa utmpfile..It Fl UThis option causes.Nm telnetdto refuse connections from addresses thatcannot be mapped back into a symbolic namevia the.Xr gethostbyaddr 3routine..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 ..It Fl L Ar pathnameSpecify pathname to an alternative login program..It Fl yMakes.Nm telnetdnot warn when a user is trying to login with cleartextpasswords..El.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 stdoutand.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.Dq cookedmode, and with.Dv XTABS and.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.Nm 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.Nm 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 send8 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, 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 telnetdKerberos is enabled, 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.Nm 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 X11 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 telnetdKerberos authentication is enabled, andindicates a willingness to receive authenticationinformation for automatic login..It "DO ENCRYPT"Only sent if.Nm telnetdKerberos is enabled, andindicates a willingness to decryptthe data stream..El.Sh FILES.Bl -tag -width /etc/services -compact.It Pa /etc/services.It Pa /etc/inittab(UNICOS systems only).It Pa /etc/iptos(if supported).El.Sh SEE ALSO.Xr login 1 ,.Xr telnet 1.Sh STANDARDS.Bl -tag -compact -width "RFC 1572 ".It RFC 854.Tn TELNETPROTOCOL SPECIFICATION.It RFC 855TELNET OPTION SPECIFICATIONS.It RFC 856TELNET BINARY TRANSMISSION.It RFC 857TELNET ECHO OPTION.It RFC 858TELNET SUPPRESS GO AHEAD OPTION.It RFC 859TELNET STATUS OPTION.It RFC 860TELNET TIMING MARK OPTION.It RFC 861TELNET EXTENDED OPTIONS - LIST OPTION.It RFC 885TELNET END OF RECORD OPTION.It RFC 1073Telnet Window Size Option.It RFC 1079Telnet Terminal Speed Option.It RFC 1091Telnet Terminal-Type Option.It RFC 1096Telnet X Display Location Option.It RFC 1123Requirements for Internet Hosts -- Application and Support.It RFC 1184Telnet Linemode Option.It RFC 1372Telnet Remote Flow Control Option.It RFC 1416Telnet Authentication Option.It RFC 1411Telnet Authentication: Kerberos Version 4.It RFC 1412Telnet Authentication: SPX.It RFC 1571Telnet Environment Option Interoperability Issues.It RFC 1572Telnet Environment Option.El.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.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -