How does linux test the port
This article will explain in detail how to test the port of linux. The content of the article is of high quality, so the editor will share it for you as a reference. I hope you will have some understanding of the relevant knowledge after reading this article.
Methods:
1. Use telnet command to test, and the syntax is "telnet ip port"
2. Using ssh test, the syntax is "ssh-v-p port username@ip".
3. Using wget test, the syntax is "wget ip:port".
The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
How to test port connectivity by linux
Start a web server and provide a port.
[wyq@localhost] $python-m SimpleHTTPServer 8080Serving HTTP on 0.0.0.0 port 8080...
It is the same with other web servers to provide ports. Since python is more convenient, we will use it here.
1. Use telnet to judge
Telnet is a windows standard service and can be used directly. If it is a linux machine, you need to install telnet.
Usage: telnet ip port
1) use telnet to connect ports that do not exist
2) reconnect the existing port
2. Use ssh to judge
Ssh is the standard configuration of linux and is most commonly used. Can it be used to determine the port?
Usage: ssh-v-p port username@ip
-v debug mode (logs will be printed).
-p designated port
Username can do whatever you want
1) No port exists for connection
2) connect to the existing port
3. Use wget to judge
Wget is a download tool under linux and needs to be installed first.
Usage: wget ip:port
1) Connect to ports that do not exist
2) connect to the existing port
4. Use the port scanning tool
On how to test the port of linux to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.