
文章插圖
Linux系統(tǒng)測試端口連通性的方法
有四種常用方法:
1. telnet 方法
2. wget 方法
3. ssh 方法
4. curl 方法
下面一一介紹 。
1. telnet
用法: telnet ip port
(1)連接不存在的端口
telnet 1.1.1.1 8
Trying 1.1.1.1…
telnet: connect to address 1.1.1.1: Connection timed out
(2)連接存在的端口
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 [email protected]
-v 調(diào)試模式(會打印日志)
-p 指定端口
這里沒有給出測試,留給讀者自己測試 。
4. curl
用法: curl ip:port
(1)連接不存在的端口
沒有結(jié)果 。
(2)連接存在的端口
curl 1.1.1.1:8000
<!DOCTYPE html>
<html>
<head>xxx</head>
<body>
……
</body>
</html>
以上關(guān)于本文的內(nèi)容,僅作參考!溫馨提示:如遇健康、疾病相關(guān)的問題,請您及時就醫(yī)或請專業(yè)人士給予相關(guān)指導(dǎo)!
「愛刨根生活網(wǎng)」www.malaban59.cn小編還為您精選了以下內(nèi)容,希望對您有所幫助:- 查看防火墻允許的端口 防火墻端口怎么開
- kali linux全部功能教程 kali滲透測試技術(shù)實戰(zhàn)
- 十一學(xué)校 專項測試卷答案
- jmeter性能測試案例分享 jmeter性能測試案例
- 服務(wù)器開啟端口命令 linux開端口命令
- 服務(wù)器打開1433端口的方法 1433端口怎么打開
- 職業(yè)測試 考研深造 散文
- 怎么測試一個女人是否出軌 測試女人出軌辦法
- 測試壽命
- 7歲兒童智商測試題
