1. Suppose we want to check whether the tcp 22 port of IP192.193.21is open, then run telnet192.192.56438.50000000106
2. If the following message appears, the table display port is not open.
3. In addition to telnet, there is also a command nc(netcat) to check whether the port is open. Also check whether tcp 22 port is open to run nc? -z192.192.193.21122, the following information will appear when you open it:
4. What should I do if I want to check whether the udp 22 port is open? Can Nc run? NC–uz192.192.193.25438+0122 (U stands for UDP), after opening, the following information will appear:
5. If the queried port is not open, the following output will appear:
6.nc can also view multiple ports at once. This solves the problem of how to test whether a port is unreachable.