📄 telnet.1
字号:
.\" 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..\" 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..\".\" @(#)telnet.1 8.6 (Berkeley) 6/1/94.\".Dd June 1, 1994.Dt TELNET 1.Os BSD 4.2.Sh NAME.Nm telnet.Nd user interface to the.Tn TELNETprotocol.Sh SYNOPSIS.Nm telnet.Op Fl 8EFKLacdfrx.Op Fl S Ar tos.Op Fl X Ar authtype.Op Fl e Ar escapechar.Op Fl k Ar realm.Op Fl l Ar user.Op Fl n Ar tracefile.Oo.Ar host.Op port.Oc.Sh DESCRIPTIONThe.Nm telnetcommandis used to communicate with another host using the.Tn TELNETprotocol.If.Nm telnetis 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..PpOptions:.Bl -tag -width indent.It Fl 8Specifies an 8-bit data path. This causes an attempt tonegotiate 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 V5 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 theBINARY option to be negotiated on output..It Fl S Ar tosSets the IP type-of-service (TOS) option for the telnetconnection to the value.Ar tos,which can be a numeric TOS valueor, on systems that support it, a symbolicTOS name found in the /etc/iptos file..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 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 escape charSets the initial.Nm.Nm telnetescape character to.Ar escape char.If.Ar escape charis omitted, thenthere will be no escape character..It Fl fIf Kerberos V5 authentication is being used, the.Fl foption allows the local credentials to be forwarded to the remote system..ne 1i.It Fl k Ar realmIf Kerberos authentication is being used, the.Fl koption requests that telnet obtain tickets for the remote host inrealm realm instead of the remote host's realm, as determinedby.Xr krb_realmofhost 3 ..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.Xr rlogin 1 .In thismode, the escape character is set to the tilde (~) character,unless modified by the -e option..It Fl xTurns on encryption of the data stream if possible. Thisoption is not available outside of the United States andCanada..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 isnot specified, the default.Nm telnetport 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,.Nm telnetwill attempt to enable the.Dv TELNET LINEMODEoption.If this fails, then.Nm telnetwill revert to one of two input modes:either \*(Lqcharacter at a time\*(Rqor \*(Lqold line by line\*(Rqdepending 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 \*(Lqcharacter at a time\*(Rq mode, mosttext typed is immediately sent to the remote host for processing..PpIn \*(Lqold line by line\*(Rq mode, all text is echoed locally,and (normally) only completed lines are sent to the remote host.The \*(Lqlocal echo character\*(Rq (initially \*(Lq^E\*(Rq) 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 \*(Lqold line by line\*(Lq; 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 BREAKThere 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,.Nm telnetcommand mode may be entered by typing the.Nm telnet\*(Lqescape character\*(Rq (initially \*(Lq^]\*(Rq).When in command mode, the normal terminal editing conventions are available..PpThe following.Nm telnetcommands 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)..Pp.Bl -tag -width "mode type".It Ic auth Ar argument ...The auth command manipulates the information sent through the.Dv TELNET AUTHENTICATEoption. Valid arguments for theauth command are as follows:.Bl -tag -width "disable type".It Ic disable Ar typeDisables the specified type of authentication. Toobtain a list of available types, use the.Ic auth disable \&?command..It Ic enable Ar typeEnables the specified type of authentication. Toobtain 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 ...Displays all, or some, of the.Ic setand.Ic togglevalues (see below)..It Ic encrypt Ar argument ...The encrypt command manipulates the information sent through the.Dv TELNET ENCRYPToption..PpNote: Because of export controls, the.Dv TELNET ENCRYPToption is not supported outside of the United States and Canada..PpValid arguments for the encrypt command are as follows:.Bl -tag -width Ar.It Ic disable Ar type Ic [input|output]Disables the specified type of encryption. If youomit the input and output, both input and outputare disabled. To obtain a list of availabletypes, use the.Ic encrypt disable \&?command..It Ic enable Ar type Ic [input|output]Enables the specified type of encryption. If youomit input and 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. Toobtain 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 input and 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...The.Ic environcommand is used to manipulate thethe variables that my 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 closecommand; however, if the remote side does not support the.Dv LOGOUToption, nothing happens.If, however, the remote side does support the.Dv LOGOUToption, this command should cause the remote side to close the.Tn TELNETconnection.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -