📄 telnet.1
字号:
.\" Copyright (c) 1983 Regents of the University of California..\" All rights reserved. The Berkeley software License Agreement.\" specifies the terms and conditions for redistribution..\".\" @(#)telnet.1c 6.5 (Berkeley) 5/10/86.\".TH TELNET 1 "May 10, 1986".UC 5.SH NAMEtelnet \- user interface to the \s-1TELNET\s0 protocol.SH SYNOPSIStelnet [.I host[.I port] ].SH DESCRIPTION.I Telnetis used to communicate with another host using the.B TELNETprotocol.If .I telnetis invoked without arguments, it enters command mode,indicated by its prompt (\*(lqtelnet>\*(rq).In this mode, it accepts and executes the commands listed below.If it is invoked with arguments, it performs an.B opencommand (see below) with those arguments..PPOnce a connection has been opened,.I telnetenters an input mode.The input mode entered will be either \*(lqcharacter at a time\*(rqor \*(lqline by line\*(rqdepending on what the remote system supports..PPIn \*(lqcharacter at a time\*(rq mode, mosttext typed is immediately sent to the remote host for processing..PPIn \*(lqline 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)..PPIn either mode, if the.I localcharstoggle is TRUE (the default in line mode; see below),the user's.IR quit ,.IR intr ,and.I flushcharacters are trapped locally, and sent as.B TELNETprotocol sequences to the remote side.There are options (see.B toggle.I autoflushand.B toggle.I autosynchbelow)which cause this action to flush subsequent output to the terminal(until the remote host acknowledges the.B TELNETsequence) and flush previous terminal input(in the case of.I quitand.IR intr )..PPWhile connected to a remote host,.I telnetcommand mode may be entered by typing the.I telnet\*(lqescape character\*(rq (initially \*(lq^]\*(rq).When in command mode, the normal terminal editing conventions are available..PP.B COMMANDS.PPThe following commands are available.Only enough of each command to uniquely identify it need be typed(this is also true for arguments to the.BR mode ,.BR set ,.BR toggle ,and.B displaycommands)..PP.TP.B open \fIhost\fP \fR[\fP \fIport\fP \fR]\fP.brOpen a connection to the named host.If no port numberis specified, .I telnetwill attempt to contact a.B TELNETserver at the default port.The host specification may be either a host name (see .IR hosts (5))or an Internet address specified in the \*(lqdot notation\*(rq (see.IR inet (3N))..TP.B close.brClose a.B TELNETsession and return to command mode..TP.B quit.brClose any open.B TELNETsession and exit .IR telnet .An end of file (in command mode) will also close a session and exit..TP.B z.brSuspend.IR telnet .This command only works when the user is using the .IR csh (1)..TP.B mode \fItype\fP.br.I Typeis either.I line(for \*(lqline by line\*(rq mode)or.I character(for \*(lqcharacter at a time\*(rq mode).The remote host is asked for permission to go into the requested mode.If the remote host is capable of entering that mode, the requestedmode will be entered..TP.B status.brShow the current status of .IR telnet .This includes the peer one is connected to, as wellas the current mode..TP.B display \fR[\fP \fIargument...\fP \fR]\fP.brDisplays all, or some, of the.B setand.B togglevalues (see below)..TP.B ? \fR[\fP \fIcommand\fP \fR]\fP.brGet help. With no arguments,.I telnetprints a help summary.If a command is specified, .I telnetwill print the help information for just that command..TP.B send \fIarguments\fP.brSends one or more special character sequences to the remote host.The following are the arguments which may be specified(more than one argument may be specified at a time):.RS.TP.I escape.brSends the current.I telnetescape character (initially \*(lq^]\*(rq)..TP.I synch.brSends the.B TELNET SYNCHsequence.This sequence causes the remote system to discard all previously typed(but not yet read) input.This sequence is sent as TCP urgentdata (and may not work if the remote system is a 4.2 BSD system -- ifit doesn't work, a lower case \*(lqr\*(rq may be echoed on the terminal)..TP.I brk.brSends the.B TELNET BRK(Break) sequence, which may have significance to the remotesystem..TP.I ip.brSends the.B TELNET IP(Interrupt Process) sequence, which should cause the remotesystem to abort the currently running process..TP.I ao.brSends the.B TELNET AO(Abort Output) sequence, which should cause the remote system to flushall output.B fromthe remote system.B tothe user's terminal..TP.I ayt.brSends the.B TELNET AYT(Are You There)sequence, to which the remote system may or may not choose to respond..TP.I ec.brSends the.B TELNET EC(Erase Character)sequence, which should cause the remote system to erase the last characterentered..TP.I el.brSends the.B TELNET EL(Erase Line)sequence, which should cause the remote system to erase the line currentlybeing entered..TP.I ga.brSends the.B TELNET GA(Go Ahead)sequence, which likely has no significance to the remote system..TP.I nop.brSends the.B TELNET NOP(No OPeration)sequence..TP.I ?.brPrints out help information for the.B sendcommand..RE.TP.B set \fIargument value\fP.brSet any one of a number of.I telnetvariables to a specific value.The special value \*(lqoff\*(rq turns off the function associated withthe variable.The values of variables may be interrogated with the.B displaycommand.The variables which may be specified are:.RS.TP.I echo.brThis is the value (initially \*(lq^E\*(rq) which, when in\*(lqline by line\*(rq mode, toggles between doing local echoingof entered characters (for normal processing), and suppressingechoing of entered characters (for entering, say, a password)..TP.I escape.brThis is the.I telnetescape character (initially \*(lq^[\*(rq) which causes entryinto.I telnetcommand mode (when connected to a remote system)..TP.I interrupt.brIf.I telnetis in.I localcharsmode (see.B toggle.I localcharsbelow)and the.I interruptcharacter is typed, a.B TELNET IPsequence (see.B send.I ipabove)is sent to the remote host.The initial value for the interrupt character is taken to bethe terminal's.B intrcharacter..TP.I quit.brIf.I telnetis in.I localcharsmode (see.B toggle.I localcharsbelow)and the.I quitcharacter is typed, a.B TELNET BRKsequence (see.B send.I brkabove)is sent to the remote host.The initial value for the quit character is taken to bethe terminal's.B quitcharacter..TP.I flushoutput.brIf.I telnetis in.I localcharsmode (see.B toggle.I localcharsbelow)and the.I flushoutputcharacter is typed, a.B TELNET AOsequence (see.B send.I aoabove)is sent to the remote host.The initial value for the flush character is taken to bethe terminal's.B flushcharacter..TP.I erase.brIf.I telnetis in.I localcharsmode (see.B toggle.I localcharsbelow),.B andif.I telnetis operating in \*(lqcharacter at a time\*(rq mode, then when thischaracter is typed, a.B TELNET ECsequence (see.B send.I ecabove)is sent to the remote system.The initial value for the erase character is taken to bethe terminal's.B erasecharacter..TP.I kill.brIf.I telnetis in.I localcharsmode (see.B toggle.I localcharsbelow),.B andif.I telnetis operating in \*(lqcharacter at a time\*(rq mode, then when thischaracter is typed, a.B TELNET ELsequence (see.B send.I elabove)is sent to the remote system.The initial value for the kill character is taken to bethe terminal's.B killcharacter..TP.I eof.brIf.I telnetis operating in \*(lqline by line\*(rq mode, entering this characteras the first character on a line will cause this character to besent to the remote system.The initial value of the eof character is taken to be the terminal's.B eofcharacter..RE.TP.B toggle \fIarguments...\fP.brToggle (betweenTRUEandFALSE)various flags that control how.I telnetresponds to events.More than one argument may be specified.The state of these flags may be interrogated with the.B displaycommand.Valid arguments are:.RS.TP.I localchars.brIf this isTRUE,then the.IR flush ,.IR interrupt ,.IR quit ,.IR erase ,and.I killcharacters (see.B setabove) are recognized locally, and transformed into (hopefully) appropriate.B TELNETcontrol sequences(respectively.IR ao ,.IR ip ,.IR brk ,.IR ec ,and.IR el ;see.B sendabove).The initial value for this toggle is TRUE in \*(lqline by line\*(rq mode,and FALSE in \*(lqcharacter at a time\*(rq mode..TP.I autoflush.brIf.I autoflushand.I localcharsare bothTRUE,then when the.IR ao ,.IR intr ,or.I quitcharacters are recognized (and transformed into.B TELNETsequences; see.B setabove for details),.I telnetrefuses to display any data on the user's terminaluntil the remote system acknowledges (via a.B TELNET.I Timing Markoption)that it has processed those.B TELNETsequences.The initial value for this toggle is TRUE if the terminal user had notdone an "stty noflsh", otherwise FALSE (see.IR stty(1))..TP.I autosynchIf.I autosynchand.I localcharsare bothTRUE,then when either the.I intror.I quitcharacters is typed (see.B setabove for descriptions of the.I intrand.I quitcharacters), the resulting.B TELNETsequence sent is followed by the.B TELNET SYNCHsequence.This procedure.B shouldcause the remote system to begin throwing away all previouslytyped input until both of the.B TELNETsequences have been read and acted upon.The initial value of this toggle is FALSE..TP.I crmod.brToggle carriage return mode.When this mode is enabled, most carriage return characters received fromthe remote host will be mapped into a carriage return followed bya line feed.This mode does not affect those characters typed by the user, onlythose received from the remote host.This mode is not very useful unless the remote hostonly sends carriage return, but never line feed.The initial value for this toggle is FALSE..TP.I debug.brToggles socket level debugging (useful only to the.IR super user ).The initial value for this toggle is FALSE..TP.I options.brToggles the display of some internal.I telnetprotocol processing (having to do with.B TELNEToptions).The initial value for this toggle is FALSE..TP.I netdata.brToggles the display of all network data (in hexadecimal format).The initial value for this toggle is FALSE..TP.I ?.brDisplays the legal.B togglecommands..RE.SH BUGS.PPThere is no adequate way for dealing with flow control..PPOn some remote systems, echo has to be turned off manually when in\*(lqline by line\*(rq mode..PPThere is enough settable state to justify a.RI . telnetrcfile..PPNo capability for a.RI . telnetrcfile is provided..PPIn \*(lqline by line\*(rq mode, the terminal's.I eofcharacter is only recognized (and sent to the remote system)when it is the first character on a line.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -