How to use Telnet commands

Source: Internet
Author: User

Telnet is the standard protocol and main method for remote logon. It provides users with the ability to complete remote host work on local computers. By using Telnet, Internet users can contact many information center libraries and other information resources around the world. There are two main scenarios for Telnet remote logon. First, the user has his/her Account on the remote master wish, that is, the user has the registered user name and password; the second is that many Internet hosts provide users with some form of public Telnet information resources, which are open to every Telnet user. Telnet is one of the simplest Internet tools.

Telnet /?

The command can be abbreviated. Supported commands are:

C-close the current connection
D-display operation parameters
O-open the host name [port] and connect to a host name (default port 23)
Q-exit telnet
Set-set setting options (to list, Type \ 'set? \')
Sen-Send the string to the server
St-status print status information
U-Undo settings unset options (to list, Type \ 'unset? \')
? /H-Help print help information

Example of Telnet port communication test:

For example, if you want to test whether port 80 of an IP address (for example, 192.168.1.200) is open, click Start -- run input:Telnet 192.168.1.200 80Then press Enter,Note: All spaces in the middle of the command line are halfwidth.

1. If the communication is normal, the following message is displayed:

2. If the communication fails, the following message is displayed:

Note that operations on different servers may be different. If you access a server on a host for the first time, you 'd better read the help information provided by the server before proceeding to the next step.

Because each service provided by the host is assigned a corresponding port value, you can use telnet to access the server even if there is no client program for this service. For example, if the port value of the news service provided by the host sonne.uiuc.edu is 119, you can use the command line $ telnet sonne.uiuc.edu 119 to obtain the News Service of the host sonne.uiuc.edu. If you have an account on the host and want to use your account to access the host, you only need to use the standard port of telnet.

Common Telnet commands

Enter "? ", The screen displays the help information of the telnet command. The following describes the common telnet command options.

Close: close the connection to the remote host. If you enter the remote host name after telnet, this command will exit telnet.

Open hostname: establish a connection with the host hostname.

Quit: Exit telnet.

Set escape charater: set the escape Character. Generally, the default escape character is Ctrl-l.

This command is useful when you use telnet to cascade several hosts. For example, if you use telnet to log on from host A to host B, and then telnet to host C from host B, you need to return to host B after completing the operations in host C, you can press the escape character. If the escape Character of host B is the same as that of host C, the user will return to host A instead of host B.

Set echo: If it is echo on, the characters entered from the keyboard will be displayed on the screen. If it is echo off, no characters entered by the keyboard will be seen.

Z: Return to the shell from the telnet status, and the connection between the two hosts continues.

Fg: return from shell to telnet. To return from telnet to remote host, press Enter.

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.