修改sshd默认端口

修改配置文件,将sshd默认端口22改为监听10086端口

[root@cxupup ~]# vim /etc/ssh/sshd_config

 17 #Port 22 
 18 Port 10086  #添加此行,修改默认端口为10086
 19 #AddressFamily any
 20 #ListenAddress 0.0.0.0
 21 #ListenAddress ::

重启sshd

[root@cxupup ~]# systemctl restart sshd

查看端口,变更成功

[root@cxupup ~]# netstat -lntp | grep 10086
tcp        0      0 0.0.0.0:10086           0.0.0.0:*               LISTEN      29250/sshd          
tcp6       0      0 :::10086                :::*                    LISTEN      29250/sshd 
posted @ 2022-01-29 11:19  两个黄鹂鸣翠柳丶  阅读(210)  评论(0)    收藏  举报