zoukankan      html  css  js  c++  java
  • 查看linux的shhd端口号 netstat | grep sshd

    [root@iZ2zef51hufoaycipfxek8Z ~]# 

    [root@iZ2zef51hufoaycipfxek8Z ~]# netstat | grep sshd

    [root@iZ2zef51hufoaycipfxek8Z ~]# 

    [root@iZ2zef51hufoaycipfxek8Z ~]# netstat -utpln | grep sshd

    tcp        0      0 0.0.0.0:43559               0.0.0.0:*                   LISTEN      1432/sshd           

    [root@iZ2zef51hufoaycipfxek8Z ~]# 

    [root@iZ2zef51hufoaycipfxek8Z ~]# 

     

    [root@iZ2zef51hufoaycipfxek8Z ~]# netstat | grep sshd

    [root@iZ2zef51hufoaycipfxek8Z ~]# 

    [root@iZ2zef51hufoaycipfxek8Z ~]# netstat -utpln | grep sshd

    tcp        0      0 0.0.0.0:43559               0.0.0.0:*                   LISTEN      1432/sshd           

    [root@iZ2zef51hufoaycipfxek8Z ~]# 

    [root@iZ2zef51hufoaycipfxek8Z ~]# 

    [root@iZ2zef51hufoaycipfxek8Z ~]# 

    netstat | grep sshd

     

     

     

    命令:vi /etc/ssh/sshd_config
    找到#Port 22

    把前面的#删掉,在下面再添加一行

    Port 5000

    命令:/bin/systemctl restart  sshd.service  

    重启服务。

    命令:firewall-cmd --zone=public --add-port=5000/tcp --permanent  

    把5000端口添加到防火墙

    命令:firewall-cmd --reload

    重新载入。
    试一下连接5000端口,好使的话把22端口删掉。
    ---------------------
    作者:weixin_35501548
    来源:CSDN
    原文:https://blog.csdn.net/weixin_35501548/article/details/78720282
    版权声明:本文为博主原创文章,转载请附上博文链接!

  • 相关阅读:
    是否完全二叉搜索树 (30 分)
    链表去重
    关于堆的判断
    玩转二叉树
    hdu-2795 Billboard(线段树)
    线段树超级大模版
    博弈dp 以I Love this Game! POJ
    kuangbin 最小生成树
    Infinite Maze CodeForces
    Alice’s Stamps HDU
  • 原文地址:https://www.cnblogs.com/xingchong/p/10244221.html
Copyright © 2011-2022 走看看