真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

總結(jié)幾種Linux環(huán)境下端口狀態(tài)判斷的方法

1. nc命令
語(yǔ)法:nc -z -v -n IPADDRESS port
-z 僅用于端口掃描,0輸入輸出
-v 顯示指令執(zhí)行過(guò)程
-n 直接使用IP地址,而不是通過(guò)域名服務(wù)器

創(chuàng)新互聯(lián)是一家專注于成都網(wǎng)站建設(shè)、網(wǎng)站制作與策劃設(shè)計(jì),新余網(wǎng)站建設(shè)哪家好?創(chuàng)新互聯(lián)做網(wǎng)站,專注于網(wǎng)站建設(shè)十年,網(wǎng)設(shè)計(jì)領(lǐng)域的專業(yè)建站公司;建站業(yè)務(wù)涵蓋:新余等地區(qū)。新余做網(wǎng)站價(jià)格咨詢:028-86922220

[root@shansibleqa ~]# nc -z -v -n IP 22
Ncat: Version 7.50 ( https://nmap.org/ncat )
Ncat: Connected to IP:22.
Ncat: 0 bytes sent, 0 bytes received in 0.01 seconds.
[root@shansibleqa ~]# nc -z -v -n IP 587
Ncat: Version 7.50 ( https://nmap.org/ncat )
Ncat: Connected to IP:587.
Ncat: 0 bytes sent, 0 bytes received in 0.01 seconds.

2. wget命令
語(yǔ)法:wget ip:port
如果通

[root@shansibleqa ~]# wget IP:22
--2019-12-24 17:43:50--  http://IP:22/
Connecting to IP:22... connected.
HTTP request sent, awaiting response... 200 No headers, assuming HTTP/0.9
Length: unspecified

如果不通

[root@shansibleqa ~]# wget IP:80
--2019-12-24 17:43:56--  http://IP/
Connecting to IP:80... failed: No route to host.

3. shell命令
語(yǔ)法:ssh -v -p port IP
能夠連上

[root@shansibleqa ~]# ssh -v -p 80 XX.XX.XX.XX
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 58: Applying options for *
debug1: Connecting to XX.XX.XX.XX [XX.XX.XX.XX] port 80.
debug1: Connection established.
debug1: permanently_set_uid: 0/0

連不上

[root@shansibleqa ~]# ssh -v -p 23 XX.XX.XX.XX
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 58: Applying options for *
debug1: Connecting to XX.XX.XX.XX [XX.XX.XX.XX] port 23.
debug1: connect to address XX.XX.XX.XX port 23: Connection timed out
ssh: connect to host XX.XX.XX.XXport 23: Connection timed out

4. curl命令
語(yǔ)法:curl ip:port
端口通

[root@shansibleqa ~]# curl ip:22
SSH-2.0-OpenSSH_7.4
curl: (56) Recv failure: Connection reset by peer

端口不通

[root@shansibleqa ~]# curl ip:443
curl: (52) Empty reply from server

分享標(biāo)題:總結(jié)幾種Linux環(huán)境下端口狀態(tài)判斷的方法
分享URL:http://weahome.cn/article/piescg.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部