321 lines
14 KiB
HTML
321 lines
14 KiB
HTML
<HTML>
|
|
<HEAD>
|
|
<TITLE>telnet(1)</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<H1>telnet(1)</H1>
|
|
<HR>
|
|
<PRE>
|
|
|
|
</PRE>
|
|
<H2>NAME</H2><PRE>
|
|
telnet - user interface to the TELNET protocol
|
|
|
|
|
|
</PRE>
|
|
<H2>SYNOPSIS</H2><PRE>
|
|
telnet [ <EM>host</EM> [ <EM>port</EM> ] ]
|
|
|
|
|
|
</PRE>
|
|
<H2>DESCRIPTION</H2><PRE>
|
|
<EM>Telnet</EM> is used to communicate with another host using the <STRONG>TELNET</STRONG>
|
|
protocol. If <EM>telnet</EM> is invoked without arguments, it enters command
|
|
mode, indicated by its prompt ("telnet>"). In this mode, it accepts and
|
|
executes the commands listed below. If it is invoked with arguments, it
|
|
performs an <STRONG>open</STRONG> command (see below) with those arguments.
|
|
|
|
Once a connection has been opened, <EM>telnet</EM> enters an input mode. The
|
|
input mode entered will be either "character at a time" or "line by line"
|
|
depending on what the remote system supports.
|
|
|
|
In "character at a time" mode, most text typed is immediately sent to the
|
|
remote host for processing.
|
|
|
|
In "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 used to turn off and on the local echo (this
|
|
would mostly be used to enter passwords without the password being
|
|
echoed).
|
|
|
|
In either mode, if the <EM>localchars</EM> toggle is TRUE (the default in line
|
|
mode; see below), the user's <EM>quit</EM>, <EM>intr</EM>, and <EM>flush</EM> characters are trapped
|
|
locally, and sent as <STRONG>TELNET</STRONG> protocol sequences to the remote side. There
|
|
are options (see <STRONG>toggle</STRONG> <EM>autoflush</EM> and <STRONG>toggle</STRONG> <EM>autosynch</EM> below) which cause
|
|
this action to flush subsequent output to the terminal (until the remote
|
|
host acknowledges the <STRONG>TELNET</STRONG> sequence) and flush previous terminal input
|
|
(in the case of <EM>quit</EM> and <EM>intr</EM>).
|
|
|
|
While connected to a remote host, <EM>telnet</EM> command mode may be entered by
|
|
typing the <EM>telnet</EM> "escape character" (initially "^]"). When in command
|
|
mode, the normal terminal editing conventions are available.
|
|
|
|
<STRONG>COMMANDS</STRONG>
|
|
|
|
The following commands are available. Only enough of each command to
|
|
uniquely identify it need be typed (this is also true for arguments to
|
|
the <STRONG>mode</STRONG>, <STRONG>set</STRONG>, <STRONG>toggle</STRONG>, and <STRONG>display</STRONG> commands).
|
|
|
|
<STRONG>open</STRONG> <EM>host</EM> [ <EM>port</EM> ]
|
|
Open a connection to the named host. If no port number is
|
|
specified, <EM>telnet</EM> will attempt to contact a <STRONG>TELNET</STRONG> server at the
|
|
default port. The host specification may be either a host name (see
|
|
<STRONG><A HREF="../man5/hosts.5.html">hosts(5)</A></STRONG>) or an Internet address specified in the "dot notation"
|
|
(see <STRONG><A HREF="../man3/inet.3N.html">inet(3N)</A></STRONG>).
|
|
|
|
<STRONG>close</STRONG>
|
|
Close a <STRONG>TELNET</STRONG> session and return to command mode.
|
|
|
|
<STRONG>quit</STRONG>
|
|
Close any open <STRONG>TELNET</STRONG> session and exit <EM>telnet</EM>. An end of file (in
|
|
command mode) will also close a session and exit.
|
|
|
|
<STRONG>z</STRONG>
|
|
Suspend <EM>telnet</EM>. This command only works when the user is using the
|
|
<STRONG><A HREF="../man1/csh.1.html">csh(1)</A></STRONG>.
|
|
|
|
<STRONG>mode</STRONG> <EM>type</EM>
|
|
<EM>Type</EM> is either <EM>line</EM> (for "line by line" mode) or <EM>character</EM> (for
|
|
"character at a time" 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 requested mode will be entered.
|
|
|
|
<STRONG>status</STRONG>
|
|
Show the current status of <EM>telnet</EM>. This includes the peer one is
|
|
connected to, as well as the current mode.
|
|
|
|
<STRONG>display</STRONG> [ <EM>argument</EM>... ]
|
|
Displays all, or some, of the <STRONG>set</STRONG> and <STRONG>toggle</STRONG> values (see below).
|
|
|
|
<STRONG>?</STRONG> [ <EM>command</EM> ]
|
|
Get help. With no arguments, <EM>telnet</EM> prints a help summary. If a
|
|
command is specified, <EM>telnet</EM> will print the help information for
|
|
just that command.
|
|
|
|
<STRONG>send</STRONG> <EM>arguments</EM>
|
|
Sends 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):
|
|
|
|
<EM>escape</EM>
|
|
Sends the current <EM>telnet</EM> escape character (initially "^]").
|
|
|
|
<EM>synch</EM>
|
|
Sends the <STRONG>TELNET</STRONG> <STRONG>SYNCH</STRONG> sequence. This sequence causes the remote
|
|
system to discard all previously typed (but not yet read) input.
|
|
This sequence is sent as TCP urgent data (and may not work if the
|
|
remote system is a 4.2 BSD system -- if it doesn't work, a lower
|
|
case "r" may be echoed on the terminal).
|
|
|
|
<EM>brk</EM>
|
|
Sends the <STRONG>TELNET</STRONG> <STRONG>BRK</STRONG> (Break) sequence, which may have significance
|
|
to the remote system.
|
|
|
|
|
|
|
|
<EM>ip</EM>
|
|
Sends the <STRONG>TELNET</STRONG> <STRONG>IP</STRONG> (Interrupt Process) sequence, which should cause
|
|
the remote system to abort the currently running process.
|
|
|
|
<EM>ao</EM>
|
|
Sends the <STRONG>TELNET</STRONG> <STRONG>AO</STRONG> (Abort Output) sequence, which should cause the
|
|
remote system to flush all output <STRONG>from</STRONG> the remote system <STRONG>to</STRONG> the
|
|
user's terminal.
|
|
|
|
<EM>ayt</EM>
|
|
Sends the <STRONG>TELNET</STRONG> <STRONG>AYT</STRONG> (Are You There) sequence, to which the remote
|
|
system may or may not choose to respond.
|
|
|
|
<EM>ec</EM>
|
|
Sends the <STRONG>TELNET</STRONG> <STRONG>EC</STRONG> (Erase Character) sequence, which should cause
|
|
the remote system to erase the last character entered.
|
|
|
|
<EM>el</EM>
|
|
Sends the <STRONG>TELNET</STRONG> <STRONG>EL</STRONG> (Erase Line) sequence, which should cause the
|
|
remote system to erase the line currently being entered.
|
|
|
|
<EM>ga</EM>
|
|
Sends the <STRONG>TELNET</STRONG> <STRONG>GA</STRONG> (Go Ahead) sequence, which likely has no
|
|
significance to the remote system.
|
|
|
|
<EM>nop</EM>
|
|
Sends the <STRONG>TELNET</STRONG> <STRONG>NOP</STRONG> (No OPeration) sequence.
|
|
|
|
?
|
|
Prints out help information for the <STRONG>send</STRONG> command.
|
|
|
|
<STRONG>set</STRONG> <EM>argument</EM> <EM>value</EM>
|
|
Set any one of a number of <EM>telnet</EM> variables to a specific value.
|
|
The special value "off" turns off the function associated with the
|
|
variable. The values of variables may be interrogated with the
|
|
<STRONG>display</STRONG> command. The variables which may be specified are:
|
|
|
|
<EM>echo</EM>
|
|
This is the value (initially "^E") which, when in "line by line"
|
|
mode, toggles between doing local echoing of entered characters (for
|
|
normal processing), and suppressing echoing of entered characters
|
|
(for entering, say, a password).
|
|
|
|
<EM>escape</EM>
|
|
This is the <EM>telnet</EM> escape character (initially "^[") which causes
|
|
entry into <EM>telnet</EM> command mode (when connected to a remote system).
|
|
|
|
<EM>interrupt</EM>
|
|
If <EM>telnet</EM> is in <EM>localchars</EM> mode (see <STRONG>toggle</STRONG> <EM>localchars</EM> below) and
|
|
the <EM>interrupt</EM> character is typed, a <STRONG>TELNET</STRONG> <STRONG>IP</STRONG> sequence (see <STRONG>send</STRONG> <EM>ip</EM>
|
|
above) is sent to the remote host. The initial value for the
|
|
interrupt character is taken to be the terminal's <STRONG>intr</STRONG> character.
|
|
|
|
<EM>quit</EM>
|
|
If <EM>telnet</EM> is in <EM>localchars</EM> mode (see <STRONG>toggle</STRONG> <EM>localchars</EM> below) and
|
|
the <EM>quit</EM> character is typed, a <STRONG>TELNET</STRONG> <STRONG>BRK</STRONG> sequence (see <STRONG>send</STRONG> <EM>brk</EM>
|
|
above) is sent to the remote host. The initial value for the quit
|
|
character is taken to be the terminal's <STRONG>quit</STRONG> character.
|
|
|
|
<EM>flushoutput</EM>
|
|
If <EM>telnet</EM> is in <EM>localchars</EM> mode (see <STRONG>toggle</STRONG> <EM>localchars</EM> below) and
|
|
the <EM>flushoutput</EM> character is typed, a <STRONG>TELNET</STRONG> <STRONG>AO</STRONG> sequence (see <STRONG>send</STRONG>
|
|
<EM>ao</EM> above) is sent to the remote host. The initial value for the
|
|
flush character is taken to be the terminal's <STRONG>flush</STRONG> character.
|
|
|
|
<EM>erase</EM>
|
|
If <EM>telnet</EM> is in <EM>localchars</EM> mode (see <STRONG>toggle</STRONG> <EM>localchars</EM> below), <STRONG>and</STRONG>
|
|
if <EM>telnet</EM> is operating in "character at a time" mode, then when this
|
|
character is typed, a <STRONG>TELNET</STRONG> <STRONG>EC</STRONG> sequence (see <STRONG>send</STRONG> <EM>ec</EM> above) is sent
|
|
to the remote system. The initial value for the erase character is
|
|
taken to be the terminal's <STRONG>erase</STRONG> character.
|
|
|
|
<EM>kill</EM>
|
|
If <EM>telnet</EM> is in <EM>localchars</EM> mode (see <STRONG>toggle</STRONG> <EM>localchars</EM> below), <STRONG>and</STRONG>
|
|
if <EM>telnet</EM> is operating in "character at a time" mode, then when this
|
|
character is typed, a <STRONG>TELNET</STRONG> <STRONG>EL</STRONG> sequence (see <STRONG>send</STRONG> <EM>el</EM> above) is sent
|
|
to the remote system. The initial value for the kill character is
|
|
taken to be the terminal's <STRONG>kill</STRONG> character.
|
|
|
|
<EM>eof</EM>
|
|
If <EM>telnet</EM> is operating in "line by line" mode, entering this
|
|
character as the first character on a line will cause this character
|
|
to be sent to the remote system. The initial value of the eof
|
|
character is taken to be the terminal's <STRONG>eof</STRONG> character.
|
|
|
|
<STRONG>toggle</STRONG> <EM>arguments</EM>...
|
|
Toggle (between TRUE and FALSE) various flags that control how
|
|
<EM>telnet</EM> responds to events. More than one argument may be specified.
|
|
The state of these flags may be interrogated with the <STRONG>display</STRONG>
|
|
command. Valid arguments are:
|
|
|
|
<EM>localchars</EM>
|
|
If this is TRUE, then the <EM>flush</EM>, <EM>interrupt</EM>, <EM>quit</EM>, <EM>erase</EM>, and <EM>kill</EM>
|
|
characters (see <STRONG>set</STRONG> above) are recognized locally, and transformed
|
|
into (hopefully) appropriate <STRONG>TELNET</STRONG> control sequences (respectively
|
|
<EM>ao</EM>, <EM>ip</EM>, <EM>brk</EM>, <EM>ec</EM>, and <EM>el</EM>; see <STRONG>send</STRONG> above). The initial value for
|
|
this toggle is TRUE in "line by line" mode, and FALSE in "character
|
|
at a time" mode.
|
|
|
|
|
|
<EM>autoflush</EM>
|
|
If <EM>autoflush</EM> and <EM>localchars</EM> are both TRUE, then when the <EM>ao</EM>, <EM>intr</EM>,
|
|
or <EM>quit</EM> characters are recognized (and transformed into <STRONG>TELNET</STRONG>
|
|
sequences; see <STRONG>set</STRONG> above for details), <EM>telnet</EM> refuses to display any
|
|
data on the user's terminal until the remote system acknowledges
|
|
(via a <STRONG>TELNET</STRONG> <EM>Timing</EM> <EM>Mark</EM> option) that it has processed those <STRONG>TELNET</STRONG>
|
|
sequences. The initial value for this toggle is TRUE if the
|
|
terminal user had not done an "stty noflsh", otherwise FALSE (see
|
|
<STRONG><A HREF="../man1/stty.1.html">stty(1)</A></STRONG>).
|
|
|
|
<EM>autosynch</EM>
|
|
If <EM>autosynch</EM> and <EM>localchars</EM> are both TRUE, then when either the <EM>intr</EM>
|
|
or <EM>quit</EM> characters is typed (see <STRONG>set</STRONG> above for descriptions of the
|
|
<EM>intr</EM> and <EM>quit</EM> characters), the resulting <STRONG>TELNET</STRONG> sequence sent is
|
|
followed by the <STRONG>TELNET</STRONG> <STRONG>SYNCH</STRONG> sequence. This procedure <STRONG>should</STRONG> cause
|
|
the remote system to begin throwing away all previously typed input
|
|
until both of the <STRONG>TELNET</STRONG> sequences have been read and acted upon.
|
|
The initial value of this toggle is FALSE.
|
|
|
|
<EM>crmod</EM>
|
|
Toggle carriage return mode. When this mode is enabled, most
|
|
carriage return characters received from the remote host will be
|
|
mapped into a carriage return followed by a line feed. This mode
|
|
does not affect those characters typed by the user, only those
|
|
received from the remote host. This mode is not very useful unless
|
|
the remote host only sends carriage return, but never line feed.
|
|
The initial value for this toggle is FALSE.
|
|
|
|
<EM>debug</EM>
|
|
Toggles socket level debugging (useful only to the <EM>super</EM>user). The
|
|
initial value for this toggle is FALSE.
|
|
|
|
<EM>options</EM>
|
|
Toggles the display of some internal <EM>telnet</EM> protocol processing
|
|
(having to do with <STRONG>TELNET</STRONG> options). The initial value for this
|
|
toggle is FALSE.
|
|
|
|
<EM>netdata</EM>
|
|
Toggles the display of all network data (in hexadecimal format).
|
|
The initial value for this toggle is FALSE.
|
|
|
|
?
|
|
Displays the legal <STRONG>toggle</STRONG> commands.
|
|
|
|
|
|
</PRE>
|
|
<H2>BUGS</H2><PRE>
|
|
|
|
There is no adequate way for dealing with flow control.
|
|
|
|
|
|
|
|
On some remote systems, echo has to be turned off manually when in "line
|
|
by line" mode.
|
|
|
|
There is enough settable state to justify a .<EM>telnetrc</EM> file.
|
|
|
|
No capability for a .<EM>telnetrc</EM> file is provided.
|
|
|
|
In "line by line" mode, the terminal's <EM>eof</EM> character is only recognized
|
|
(and sent to the remote system) when it is the first character on a line.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</PRE>
|
|
</BODY>
|
|
</HTML>
|