⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 telnet.1.txt

📁 经典的unix下telnet的c代码
💻 TXT
📖 第 1 页 / 共 3 页
字号:
.\"	$OpenBSD: telnet.1,v 1.37 2003/12/28 21:53:01 otto Exp $.\"	$NetBSD: telnet.1,v 1.5 1996/02/28 21:04:12 thorpej Exp $.\".\" Copyright (c) 1983, 1990, 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..\".\"	from: @(#)telnet.1	8.4 (Berkeley) 2/3/94.\".Dd February 3, 1994.Dt TELNET 1.Os.Sh NAME.Nm telnet.Nd user interface to the.Tn TELNETprotocol.Sh SYNOPSIS.Nm telnet.Bk -words.Op Fl 468EFKLacdfrx.Op Fl X Ar authtype.Op Fl b Ar hostalias.Op Fl e Ar escapechar.Op Fl k Ar realm.Op Fl l Ar user.Op Fl n Ar tracefile.Oo.Ar host.Op Ar port.Oc.Ek.Sh DESCRIPTIONThe.Nmcommandis used to communicate with another host using the.Tn TELNETprotocol.If.Nmis invoked without the.Ar hostargument, it enters command mode,indicated by its prompt.Pq Nm telnet\&> .In this mode, it accepts and executes the commands listed below.If it is invoked with arguments, it performs an.Ic opencommand with those arguments..PpThe options are as follows:.Bl -tag -width Ds.It Fl 4Forces.Nmto use IPv4 addresses only..It Fl 6Forces.Nmto use IPv6 addresses only..It Fl 8Specifies an 8-bit data path.This causes an attempt to negotiate the.Dv TELNET BINARYoption on both input and output..It Fl EStops any character from being recognized as an escape character..It Fl FIf Kerberos authentication is being used, the.Fl Foption allows the local credentials to be forwardedto the remote system, including any credentials thathave already been forwarded into the local environment..It Fl KSpecifies no automatic login to the remote system..It Fl LSpecifies an 8-bit data path on output.This causes the BINARY option to be negotiated on output..It Fl X Ar atypeDisables the.Ar atypetype of authentication..It Fl aAttempt automatic login.Currently, this sends the user name via the.Ev USERvariableof the.Ev ENVIRONoption if supported by the remote system.The name used is that of the current user as returned by.Xr getlogin 2if it agrees with the current user ID,otherwise it is the name associated with the user ID..It Fl b Ar hostaliasUses.Xr bind 2on the local socket to bind it to an aliased address (see.Xr ifconfig 8and the ``alias'' specifier) or to the address ofanother interface than the one naturally chosen by.Xr connect 2 .This can be useful when connecting to services which use IP addressesfor authentication and reconfiguration of the server is undesirable (orimpossible)..It Fl cDisables the reading of the user's.Pa \&.telnetrcfile.(See the.Ic toggle skiprccommand on this man page.).It Fl dSets the initial value of the.Ic debugtoggle to.Dv TRUE ..It Fl e Ar escapecharSets the initial.Nmescape character to.Ar escapechar .If.Ar escapecharis omitted, thenthere will be no escape character..It Fl fIf Kerberos authentication is being used, the.Fl foption allows the local credentials to be forwarded to the remote system..It Fl k Ar realmIf Kerberos authentication is being used, the.Fl koption requests that.Nmobtain tickets for the remote host inrealm.Ar realminstead of the remote host's realm..It Fl l Ar userWhen connecting to the remote system, if the remote systemunderstands the.Ev ENVIRONoption, then.Ar userwill be sent to the remote system as the value for the variable USER.This option implies the.Fl aoption.This option may also be used with the.Ic opencommand..It Fl n Ar tracefileOpens.Ar tracefilefor recording trace information.See the.Ic set tracefilecommand below..It Fl rSpecifies a user interface similar to.Nm rlogin .In thismode, the escape character is set to the tilde (~) character,unless modified by the.Fl eoption..It Fl xTurn on encryption of the data stream.When this option is turned on,.Nmwill exit with an error if authentication cannot be negotiated or ifencryption cannot be turned on..It Ar hostIndicates the official name, an alias, or the Internet addressof a remote host..It Ar portIndicates a port number (address of an application).If a number is not specified, the default.Nmport is used..El.PpWhen in rlogin mode, a line of the form ~.\&disconnects from theremote host; ~ is the telnet escape character.Similarly, the line ~^Z suspends the telnet session.The line ~^] escapes to the normal telnet escape prompt..PpOnce a connection has been opened,.Nmwill attempt to enable the.Dv TELNET LINEMODEoption.If this fails,.Nmwill revert to one of two input modes:either ``character at a time''or ``old line by line''depending on what the remote system supports..PpWhen.Dv LINEMODEis enabled, character processing is done on thelocal system, under the control of the remote system.When inputediting or character echoing is to be disabled, the remote systemwill relay that information.The remote system will also relaychanges to any special characters that happen on the remotesystem, so that they can take effect on the local system..PpIn ``character at a time'' mode, mosttext typed is immediately sent to the remote host for processing..PpIn ``old line by line'' mode, all text is echoed locally,and (normally) only completed lines are sent to the remote host.The ``local echo character'' (initially ``^E'') may be usedto turn off and on the local echo(this would mostly be used to enter passwordswithout the password being echoed)..PpIf the.Dv LINEMODEoption is enabled, or if the.Ic localcharstoggle is.Dv TRUE(the default for ``old line by line''; see below),the user's.Ic quit ,.Ic intr ,and.Ic flushcharacters are trapped locally, and sent as.Tn TELNETprotocol sequences to the remote side.If.Dv LINEMODEhas ever been enabled, then the user's.Ic suspand.Ic eofare also sent as.Tn TELNETprotocol sequences,and.Ic quitis sent as a.Dv TELNET ABORTinstead of.Dv BREAK .There are options (see.Ic toggle.Ic autoflushand.Ic toggle.Ic autosynchbelow)which cause this action to flush subsequent output to the terminal(until the remote host acknowledges the.Tn TELNETsequence) and flush previous terminal input(in the case of.Ic quitand.Ic intr ) ..PpWhile connected to a remote host,.Nmcommand mode may be entered by typing the.Nm``escape character'' (initially ``^]'').When in command mode, the normal terminal editing conventions are available.Note that the escape character will return to the command mode of the initialinvocation of.Nmthat has the controlling terminal.Use the.Cm send escapecommand to switch to command mode in subsequent.Nmprocesses on remote hosts..PpThe following.Nmcommands are available.Only enough of each command to uniquely identify it need be typed(this is also true for arguments to the.Ic mode ,.Ic set ,.Ic toggle ,.Ic unset ,.Ic slc ,.Ic environ ,and.Ic displaycommands)..Bl -tag -width "mode type".It Ic auth Ar argument Op Ar ...The.Ic authcommand manipulates the information sent through the.Dv TELNET AUTHENTICATEoption.Valid arguments for the.Ic authcommand are as follows:.Bl -tag -width "disable type".It Ic disable Ar typeDisables the specified.Ar typeof authentication.To obtain a list of available types, use the.Ic auth disable ?\&command..It Ic enable Ar typeEnables the specified.Ar typeof authentication.To obtain a list of available types, use the.Ic auth enable ?\&command..It Ic statusLists the current status of the various types ofauthentication..El.It Ic closeClose a.Tn TELNETsession and return to command mode..It Ic display Ar argument Op Ar ...Displays all, or some, of the.Ic setand.Ic togglevalues (see below)..It Ic encrypt Ar argument Op Ar ...The.Ic encryptcommand manipulates the information sent through the.Dv TELNET ENCRYPToption that's available when Kerberos is used..PpValid arguments for the encrypt command are as follows:.Bl -tag -width Ar.It Ic disable Ar type Ic [input|output]Disables the specified.Ar typeof encryption.If you omit.Ic inputand.Ic output ,both input and outputare disabled.To obtain a list of available types, use the.Ic encrypt disable ?\&command..It Ic enable Ar type Ic [input|output]Enables the specified.Ar typeof encryption.If you omit.Ic inputand.Ic output ,both input and output areenabled.To obtain a list of available types, use the.Ic encrypt enable ?\&command..It Ic inputThis is the same as the.Ic encrypt start inputcommand..It Ic -inputThis is the same as the.Ic encrypt stop inputcommand..It Ic outputThis is the same as the.Ic encrypt start outputcommand..It Ic -outputThis is the same as the.Ic encrypt stop outputcommand..It Ic start Ic [input|output]Attempts to start encryption.If you omit.Ic inputand.Ic output ,both input and output are enabled.To obtain a list of available types, use the.Ic encrypt enable ?\&command..It Ic statusLists the current status of encryption..It Ic stop Ic [input|output]Stops encryption.If you omit.Ic inputand.Ic output ,encryption is on both input and output..It Ic type Ar typeSets the default type of encryption to be usedwith later.Ic encrypt startor.Ic encrypt stopcommands..El.It Ic environ Ar arguments Op Ar ...The.Ic environcommand is used to manipulate thevariables that may be sent through the.Dv TELNET ENVIRONoption.The initial set of variables is taken from the usersenvironment, with only the.Ev DISPLAYand.Ev PRINTERvariables being exported by default.The.Ev USERvariable is also exported if the.Fl aor.Fl loptions are used..brValid arguments for the.Ic environcommand are:.Bl -tag -width Fl.It Ic define Ar variable valueDefine the variable.Ar variableto have a value of.Ar value .Any variables defined by this command are automatically exported.The.Ar valuemay be enclosed in single or double quotes sothat tabs and spaces may be included..It Ic undefine Ar variableRemove.Ar variablefrom the list of environment variables..It Ic export Ar variableMark the variable.Ar variableto be exported to the remote side..It Ic unexport Ar variableMark the variable.Ar variableto not be exported unlessexplicitly asked for by the remote side..It Ic listList the current set of environment variables.Those marked with a.Cm *will be sent automatically,other variables will only be sent if explicitly requested..It Ic \&?Prints out help information for the.Ic environcommand..El.It Ic logoutSends the.Dv TELNET LOGOUToption to the remote side.This command is similar to a.Ic close

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -