Common Telnet commands

Source: Internet
Author: User
Tags close close set set telnet program

I have learned a lot about Telnet and related settings and usage. We know little about Telnet commands. Here we will explain the Telnet command. In addition to the example of how Telnet works, Telnet has many features. Telnet can send any character except "escape" to the remote host. Because the "escape" character is a special command mode of the client in Telnet, its default value is "Ctrl-]". But be sure not to confuse it with the Esc key on the keyboard. We can set "escape" to any character, but for the Telnet command, it is assumed that this character cannot be transferred to the remote host, the Esc key is a non-printable character. Telnet uses it to delete commands in the remote system. Remember that the "escape" character is not always expressed as "Ctrl.

You can simply type Telnet without machine words. In this case, Telnet> is displayed, indicating that Telnet is waiting for a command, such as a question mark "? "A useful command table is obtained:

telnet: ? 
Commands may be abbreviated, Command are:
open connect to a site
close close currect connection
quit exit telnet
display display operating parameters
send transmit special characters ('send ?' for more)
set set operating parameters('set ?' for more)
status print status information
toggle toggle operating parameters('toggle ?' for more)
mode try to enter line-by-line or character-at-a-time mode
? print help information

Although there are many commands and even sub-commands, only some are commonly used. We will introduce the following:

Close:
This command terminates the connection. It can automatically disconnect from the remote system or exit the Telnet command. This command can be used if you want to quit when you enter a network host.

Open:
It is used to connect to a named machine, and the name or IP address of the target machine must be given. If no machine name is provided, Telnet selects a machine name. Note that you should use "close" to close any existing connection before using the "Open" command.

Set ECHO:
The local response is On or Off. Whether to display the output content on the screen. It is basically the same as dos echo. If the machine is on echo on and you want to change it to OFF, You can input set echo and change it back to echo off. Then you can type set echo. (This is short. If you have any questions, contact me)

Set escape char:
Create a "escape" character to a special symbol. to replace it with a certain control symbol, you can use "asis" or enter the symbol "^" and add the letter B (for example: ^ B ). During normal operation, the character "escape" is not required, and the symbol used as "escape" cannot be used again. This is similar to setting the true meaning of each key on the keyboard in many programs. However, if you are running a daisy-chained application system, it is useful to re-determine the features of the "escape" character. For example, use the Telnet command from system A to system B, and then use Telnet to register and enter system C. If a fault occurs when the system is working on system C, when the "escape" symbol is the same, the connection between system B and system C cannot be interrupted. Enter the "escape" identifier, which is always in the command mode of system. If different "escape" symbols are used in each Telnet part, you can select one of the command modes by typing an appropriate symbol, this can also be used for terminal simulation in other applications ).

Quit:
Use it to smoothly launch the Telnet program.

Z:
Retain Telnet, but temporarily return to the local system to execute other commands. Connections in the Telnet command and other options are retained when Telnet is restored.

Carriage Return:
Returns a command from the command mode to the connected remote machine. In addition, there are many other commands that can launch the command mode. The following example shows how to enter porky.math.ukans.edu from registration, enter the command mode, and return porky ::

telnet porky.math.ukans.edu 
Trying 129.237.128.11...
Connected to porky.math.ukans.edu.
Escape character is '^]'.
SunOS UNIX(porky)
login:wl
password:
Last Login: Tue Mar 28 05:35 from ns.bta.net.cn
SunOS Release 4.1.3_U1(SLIPPERY1) #3: Sun Nov 20 23:47:23 CST 1999
No match.
if:Expression syntax.
porky/serv/wl%cd/
porky/%CTRL-]
telnet:?
Commands may be abbreviated, Command are:
open connect to a site
close close currect connection
quit exit telnet
display display operating parameters
send transmit special characters ('send ?' for more)
set set operating parameters('set ?' for more)
status print status information
toggle toggle operating parameters('toggle ?' for more)
mode try to enter line-by-line or character-at-a-time mode
? print help information
telnet:set escape ^b
escape character is ’^b’
porky/%logout
ns.bta.net.cn%

Note: The set command can also exit the command mode. Of course, if not, you can press enter to enter an empty line and return to porky.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.