Telnet command to check whether the port on the remote host is enabled
The ping command cannot detect the port. It can only detect whether you can connect to the corresponding IP address. An Ubuntu is installed on the local Virtual Machine. When you use Putty to connect to port 22, an error is prompted. Therefore, check whether the corresponding port is enabled. In Windows, to check whether a port on the remote host is enabled, use the built-in Microsoft telnet tool.
1. Install telnet. By default, the telnet function is disabled in win7. Enter the telnet command in cmd to indicate that this command is not available.
Go to control panel ----> program ----> to enable or disable windows. Then, wait for a while and select the telnet client and telnet server in the displayed dialog box, so that the telnet component is installed.
2. test whether a port is enabled. The address of the VM enabled on the local machine, port 192.168.106.128 and port 22.
After entering telnet in cmd, a window will appear. Enter help as prompted to view the options,
Enter o 192.168.106.128 22, and the system prompts that the connection to the port fails. This indicates that the port may be in use or is not enabled.
(My connection failed because the Ubuntu just installed on the virtual machine does not have the ssh service. The connection is successful after you use the sudo apt-get install ssh command to install the ssh service ).
If another window is opened, the connection is successful.
3. You can use your own machine to perform experiments. Enter netstat-anp tcp in CMD to view the ports opened by tcp on the current host.
4. Check whether the local port is occupied in Linux: netstat-apn | grep 8080
Ubuntu 12.04 Telnet service settings
Install and create a Telnet server in Ubuntu
Install Telnet on CentOS/RHEL/Scientific Linux 6 & 7
Allow telnet access by the root user
This article permanently updates the link address: