Linuxでポートをテストするいくつかのコマンド
4221 ワード
https://blog.csdn.net/z1134145881/article/details/54706711
1.telnet
2.wget
3.ssh
4.
1.telnet
: telnet ip port
(1) telnet
telnet 1.1.1.1 8
Trying 1.1.1.1...
telnet: connect to address 1.1.1.1: Connection timed out
(2) telnet
telnet 1.1.1.1 8000
Trying 1.1.1.1...
Connected to 1.1.1.1.
Escape character is '^]'.
Connection closed by foreign host.
2.wget
: wget ip:port
(1)
wget 1.1.1.1:8
--2017-01-24 11:38:34-- http://1.1.1.1:8/ Connecting to 1.1.1.1:8...
failed: Connection timed out. Retrying.
(2)
wget 1.1.1.1:8000
--2017-01-24 11:39:03-- http://1.1.1.1:8000/
Connecting to 1.1.1.1:8000... connected.
HTTP request sent, awaiting response... 200 OK
3.ssh
: ssh -v -p port username@ip
-v ( ).
-p
4.
: curl ip:port
(1)
(2)
curl 1.1.1.1:8000
<head>xxxhead>
......