其他分享
首页 > 其他分享> > 修改sshd默认端口

修改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 

标签:sshd,0.0,10086,端口,默认,cxupup,root
来源: https://www.cnblogs.com/cxupup/p/15854594.html