Section: User Commands (1)
The telnet command is used for interactive communication with another host using the TELNET protocol. It begins in command mode, where it prints a telnet prompt ("telnet> "). If telnet is invoked with a host argument, it performs an open command implicitly; see the description below.
Once a connection has been opened, telnet will attempt to enable the TELNET LINEMODE option. If this fails, then telnet will revert to one of two input modes: either “character at a time” or “old line by line” depending on what the remote system supports.
When LINEMODE is enabled, character processing is done on the local system, under the control of the remote system. When input editing or character echoing is to be disabled, the remote system will relay that information. The remote system will also relay changes to any special characters that happen on the remote system, so that they can take effect on the local system.
In “character at a time” mode, most text typed is immediately sent to the remote host for processing.
In “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 used to turn off and on the local echo (this would mostly be used to enter passwords without the password being echoed).
If the LINEMODE option is enabled, or if the localchars toggle is TRUE (the default for “old line by line“; see below), the user's quit intr and flush characters are trapped locally, and sent as TELNET protocol sequences to the remote side. If LINEMODE has ever been enabled, then the user's susp and eof are also sent as TELNET protocol sequences, and quit is sent as a TELNET ABORT instead of BREAK There are options (see toggle autoflush and toggle autosynch below) which cause this action to flush subsequent output to the terminal (until the remote host acknowledges the TELNET sequence) and flush previous terminal input (in the case of quit and intr )
The following telnet commands are available. Unique prefixes are understood as abbreviations.
Note that the current version of telnet does not support authentication.
Valid arguments are as follows:
Note that the current version of telnet does not support encryption.
Valid arguments for the environ command are:
When connecting to ports other than the telnet port, telnet does not attempt telnet protocol negotiations. This makes it possible to connect to services that do not support the telnet protocol without making a mess. Protocol negotiation can be forced by placing a dash before the port number.
After establishing a connection, any commands associated with the remote host in /etc/telnetrc and the user's .telnetrc file are executed, in that order.
The format of the telnetrc files is as follows: Lines beginning with a #, and blank lines, are ignored. The rest of the file should consist of hostnames and sequences of telnet commands to use with that host. Commands should be one per line, indented by whitespace; lines beginning without whitespace are interpreted as hostnames. Lines beginning with the special hostname `DEFAULT' will apply to all hosts. Hostnames including `DEFAULT' may be followed immediately by a colon and a port number or string. If a port is specified it must match exactly with what is specified on the command line. If no port was specified on the command line, then the value `telnet' is used. Upon connecting to a particular host, the commands associated with that host are executed.
:set argument value
Note that this flag exists only if encryption support is enabled.
On some remote systems, echo has to be turned off manually when in “old line by line” mode.
The source code is not comprehensible.
Tutoriais de Tecnologia Web