The Telnet command detects if the port on the remote host is turned on

Source: Internet
Author: User

The ping command cannot detect the port and can only detect if you and the corresponding IP are able to connect. an Ubuntu is installed in the local virtual machine, and the prompt fails when connecting to port 22 using putty, so check that the corresponding port is turned on. under Windows to detect whether a port on a remote host is turned on, you can use the Microsoft Self-tool telnet.

1. Install Telnet. Win7 The default Telnet function is off, enter the Telnet prompt under cmd without the command.

Go to Control Panel----> Programs----> Turn Windows features on or off. Then wait a while, in the dialog box to check the Telnet client and Telnet server, so that the Telnet component is installed.


2. Test whether a port is turned on. The 192.168.106.128,22 port is the virtual machine address that the machine opens.

After you enter telnet under CMD, a window will appear, follow the prompts to enter help to see the options,

Next Enter O 192.168.106.128 22, indicating that the port connection failed, indicating that the port may be in use or not open

(My connection failed because the virtual machine has just installed Ubuntu without the SSH service, and the connection is successful with the sudo apt-get install ssh command after installing the SSH service.)

If you open another window, the connection is successful.

3. You can use your own machine to do the experiment. Enter NETSTAT-ANP TCP under CMD to see which ports are open to the current host TCP.

4.Linux detection of the port of the machine is occupied: NETSTAT–APN | grep 8080

The Telnet command detects if the port on the remote host is turned on

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.