Centos7修改SSH端口号

发布时间:2022-11-23 00:26:12阅读:73次
系统大全为您提供注意!这里的Centos版本是7step1 修改/etc/ssh/sshd_config vi /etc/ssh/sshd_config #Port 22 //这行去掉#号 Port 20000 //下面添加这一行step2 修改SELinux 使用以下命令查看当前SElinux 允许的ssh端口: semanage port -l | grep ssh添加20000端口到 SELinux semanage port -a -t ssh_port_t -p tcp 20000然后确认一下是否添加进去 semanage port -l | grep ssh如果成功会输出 ssh_port_t tcp 20000, 22step3 重启ssh systemctl restart sshd.service   以上就是系统大全给大家介绍的如何使的方法都有一定的了解了吧,好了,如果大家还想了解更多的资讯,那就赶紧点击系统大全官网吧。本文来自系统大全http://www.win7cn.com/如需转载请注明!推荐:win7纯净版