[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
版权声明:本文为博主原创文章,转载请附上博文链接!

相关文章:

  • 2022-01-06
  • 2021-08-11
  • 2022-12-23
  • 2021-12-12
  • 2022-02-24
  • 2021-06-29
猜你喜欢
  • 2021-07-22
  • 2021-11-22
  • 2021-11-19
  • 2021-06-26
  • 2022-02-01
  • 2021-08-08
  • 2022-12-23
相关资源
相似解决方案