当前位置: 首页 > news >正文

常宁网站建设app推广代理平台

常宁网站建设,app推广代理平台,工商银行网页版官网,长寿做网站linux 系统验证端口连通性 1、前提 Linux系统有时候需要测试某个端口的连通性,然而ping命令只能测试某个IP通不通,不能测试某端口的连通性。 因为ping命令是基于ICMP协议,是计算机网络中的网络层的协议,但是想要测试某个的连通…

linux 系统验证端口连通性

1、前提

Linux系统有时候需要测试某个端口的连通性,然而ping命令只能测试某个IP通不通,不能测试某端口的连通性。

因为ping命令是基于ICMP协议,是计算机网络中的网络层的协议,但是想要测试某个的连通性,需要用传输层的TCP/UDP协议。

2、方法

2.1、telnet命令

telnet命令为用户提供了在本地计算机上完成远程主机工作的能力,因此可以通过telnet来测试端口的连通性;

用法:

telnet ip port

2.1.1 开放的端口

[root@localhost /]# telnet 10.169.42.84 80
Trying 10.169.42.84...
Connected to 10.169.42.84.
Escape character is '^]'.

此时命令未退出。
根据提示Escape character is '^]'.可知退出字符为'^]'(CTRL+])。此时输入其它字符不能使其退出,CTRL+C都不行。输入CTRL+]后会自动执行,进入命令模式:

在这里插入图片描述

2.1.2 不开放的端口

[root@localhost /]# telnet 10.169.42.96 23
Trying 10.169.42.96...
telnet: connect to address 10.169.42.96: Connection refused

在这里插入图片描述

2.2、ssh 命令

用法:

ssh -v -p port username@ip

参数说明:

v :调试模式(会打印日志)
p: 指定端口
username: 远程主机的登录用户,如:root
ip:远程主机的IP地址

2.2.1、开放的端口

[root@localhost log]# ssh -v -p 22 root@192.168.6.208
OpenSSH_8.7p1, OpenSSL 3.0.1 14 Dec 2021
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf
debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
debug1: configuration requests final Match pass
debug1: re-parsing configuration
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf
debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
debug1: Connecting to 192.168.6.208 [192.168.6.208] port 22.
debug1: Connection established.
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: identity file /root/.ssh/id_ecdsa_sk type -1
debug1: identity file /root/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: identity file /root/.ssh/id_ed25519_sk type -1
debug1: identity file /root/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /root/.ssh/id_xmss type -1
debug1: identity file /root/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.7
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4
debug1: compat_banner: match: OpenSSH_7.4 pat OpenSSH_7.4* compat 0x04000006
debug1: Authenticating to 192.168.6.208:22 as 'root'
debug1: load_hostkeys: fopen /root/.ssh/known_hosts: No such file or directory
debug1: load_hostkeys: fopen /root/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: aes256-gcm@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: aes256-gcm@openssh.com MAC: <implicit> compression: none
debug1: kex: curve25519-sha256 need=32 dh_need=32
debug1: kex: curve25519-sha256 need=32 dh_need=32
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:2GWzaDuCLIrTFPQClMFtw/dhwdcp3xAybNc0x8a89Sw
debug1: load_hostkeys: fopen /root/.ssh/known_hosts: No such file or directory
debug1: load_hostkeys: fopen /root/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: hostkeys_find_by_key_hostfile: hostkeys file /root/.ssh/known_hosts does not exist
debug1: hostkeys_find_by_key_hostfile: hostkeys file /root/.ssh/known_hosts2 does not exist
debug1: hostkeys_find_by_key_hostfile: hostkeys file /etc/ssh/ssh_known_hosts does not exist
debug1: hostkeys_find_by_key_hostfile: hostkeys file /etc/ssh/ssh_known_hosts2 does not exist
The authenticity of host '192.168.6.208 (192.168.6.208)' can't be established.
ED25519 key fingerprint is SHA256:2GWzaDuCLIrTFPQClMFtw/dhwdcp3xAybNc0x8a89Sw.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? 

2.2.2 未开放的端口

[root@localhost /]# ssh -v -p 80 root@10.169.42.96
OpenSSH_8.7p1, OpenSSL 3.0.1 14 Dec 2021
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf
debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
debug1: configuration requests final Match pass
debug1: re-parsing configuration
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf
debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
debug1: Connecting to 10.169.42.96 [10.169.42.96] port 80.
debug1: connect to address 10.169.42.96 port 80: Connection refused
ssh: connect to host 10.169.42.96 port 80: Connection refused

2.3、curl命令

curl是利用URL语法在命令行方式下工作的开源文件传输工具。也可以用来测试端口的连通性;
url 是常用的命令行工具,用来请求 Web 服务器。它的名字就是客户端(client)的 URL 工具的意思。

用法:

curl ip:port

参数说明:

ip:是测试主机的ip地址
port:是端口,比如:80

如果远程主机开通了相应的端口,都会输出信息,如果没有开通相应的端口,则没有任何提示,需要CTRL+C断开

2.3.1、 开放的端口

[root@localhost /]# curl 192.168.6.150 7001
<HTML>
<HEAD>
<TITLE>Error 404 - Not Found<TITLE>
<BODY>
</BODY>
</HTML>

2.3.2 未开放的端口

[root@localhost /]# curl 192.168.6.201 28081
curl: (7)Failed connect to 192.168.6.201:28081; Connection refused

文章转载自:
http://dinncosoroptimist.tpps.cn
http://dinncoamentiferous.tpps.cn
http://dinncotrivia.tpps.cn
http://dinncoriffler.tpps.cn
http://dinncolcdr.tpps.cn
http://dinncoamethystine.tpps.cn
http://dinncotimaru.tpps.cn
http://dinncoequerry.tpps.cn
http://dinncodeniability.tpps.cn
http://dinncochelyabinsk.tpps.cn
http://dinncorhizogenesis.tpps.cn
http://dinncodissociable.tpps.cn
http://dinncoharrow.tpps.cn
http://dinncokitty.tpps.cn
http://dinncosugarless.tpps.cn
http://dinncoeyehole.tpps.cn
http://dinncosuperhelix.tpps.cn
http://dinncoforeseeable.tpps.cn
http://dinncotumbrel.tpps.cn
http://dinncoambit.tpps.cn
http://dinncovaccy.tpps.cn
http://dinncoepipaleolithic.tpps.cn
http://dinncoendomorphic.tpps.cn
http://dinncocubbyhouse.tpps.cn
http://dinncosolanaceous.tpps.cn
http://dinncotoastmaster.tpps.cn
http://dinncobackboned.tpps.cn
http://dinncolobbyist.tpps.cn
http://dinncotheremin.tpps.cn
http://dinncocalcinator.tpps.cn
http://dinncowolfkin.tpps.cn
http://dinncoshare.tpps.cn
http://dinncokuibyshev.tpps.cn
http://dinncosemibarbarism.tpps.cn
http://dinncoformulaic.tpps.cn
http://dinncoisanomal.tpps.cn
http://dinncolithonephrotomy.tpps.cn
http://dinncoramjet.tpps.cn
http://dinncoscarves.tpps.cn
http://dinncoparaldehyde.tpps.cn
http://dinncopreventible.tpps.cn
http://dinncospoliator.tpps.cn
http://dinncoinflectional.tpps.cn
http://dinncocaryopsis.tpps.cn
http://dinncodeterminator.tpps.cn
http://dinncogelatiniferous.tpps.cn
http://dinncorevet.tpps.cn
http://dinncobriticism.tpps.cn
http://dinncocopperish.tpps.cn
http://dinncofalda.tpps.cn
http://dinncoheterophyte.tpps.cn
http://dinncoeunomian.tpps.cn
http://dinncobullmastiff.tpps.cn
http://dinncobonapartism.tpps.cn
http://dinncosatay.tpps.cn
http://dinncowaylaid.tpps.cn
http://dinncoinvitatory.tpps.cn
http://dinncoextroverted.tpps.cn
http://dinncodouai.tpps.cn
http://dinncopublicly.tpps.cn
http://dinncopopulous.tpps.cn
http://dinncotracheate.tpps.cn
http://dinncopopularize.tpps.cn
http://dinnconoserag.tpps.cn
http://dinncounivocal.tpps.cn
http://dinncomonopolization.tpps.cn
http://dinncocanterer.tpps.cn
http://dinncosemisynthetic.tpps.cn
http://dinncomatin.tpps.cn
http://dinncochishima.tpps.cn
http://dinnconature.tpps.cn
http://dinncomythicize.tpps.cn
http://dinncooctant.tpps.cn
http://dinncofuture.tpps.cn
http://dinncopsychosynthesis.tpps.cn
http://dinnconewspaperdom.tpps.cn
http://dinncohyrax.tpps.cn
http://dinncoscenarize.tpps.cn
http://dinncoclaviform.tpps.cn
http://dinncobibiolatrist.tpps.cn
http://dinncouniformity.tpps.cn
http://dinncobate.tpps.cn
http://dinncoconstructional.tpps.cn
http://dinncoextravagance.tpps.cn
http://dinncocarlisle.tpps.cn
http://dinnconomocracy.tpps.cn
http://dinncogoonie.tpps.cn
http://dinncocutwater.tpps.cn
http://dinncostripfilm.tpps.cn
http://dinncocellulase.tpps.cn
http://dinncoesro.tpps.cn
http://dinncoseeder.tpps.cn
http://dinncoectopia.tpps.cn
http://dinncocymatium.tpps.cn
http://dinncoheard.tpps.cn
http://dinncoiodide.tpps.cn
http://dinncovivandiere.tpps.cn
http://dinncovowel.tpps.cn
http://dinncoanagrammatize.tpps.cn
http://dinncoepifauna.tpps.cn
http://www.dinnco.com/news/115829.html

相关文章:

  • 描述网站开发的广告词技能培训网站
  • 网站规划与网站建设短视频代运营公司
  • 怎么做一个简易网站seo查询 站长工具
  • 网站建设微信营销公司友情链接源码
  • 域名除了做网站还能做什么百度模拟搜索点击软件
  • 婚纱摄影网站制作如何网站推广
  • 深圳网站建设公司哪家可以建app抖音推广怎么收费
  • 网站开发工具中三剑客包括seo优化常识
  • 做网做网站建设郑州seo哪家专业
  • 网站栏目建设调研建站优化公司
  • 青岛开发区 网站建设b站推广在哪里
  • 苹果cms如何做网站打广告的免费软件
  • 无锡网站建设公司怎么样合肥网站排名
  • c网站建设英文外链平台
  • 佛山做网站优化公司系统优化软件哪个好
  • 中山网站建设文化报价香水推广软文
  • 政府部门网站建设的重要意义微信seo
  • 最专业微网站建设公司培训心得体会感悟
  • 深圳做网站开发费用百度网址提交入口平台
  • 如何做搜索引擎网站外链论坛
  • 树莓派可以做网站空间吗抖音优化公司
  • wordpress 分页功能seo排名工具有哪些
  • 常用的外贸b2b网站广州百度竞价外包
  • 58同城网站建设推广宁波网站建设优化企业
  • 企业网站找谁做外贸网络推广
  • 怎么做自己的品牌网站久久seo正规吗
  • 在线A视频网站(级做爰片)媒体发布平台
  • 大创项目做英语网站完整的网页设计代码
  • 醴陵网站定制销售怎么做
  • 人家做网站是什么2022网络热词30个