1、关闭selinux
[root~·]getenforce #查看状态
Enforcing
[root~·]setenforce 0 #临时关闭
Permissive
#永久关闭
[root~·] vim /etc/sysconfig/selinux
将SELINUX=enforcing 改为 SELINUX=disabled
重启服务器
2、修改修改ssh端口号为为2202
[root~·] vim /etc/ssh/sshd_config
将port改为2202
[root~·]systemctl restart sshd
开启端口
[root~·]firewall-cmd --add-port=2202/tcp --permanent
[root~·]firewall-cmd --reload
修改lunux服务机默认端口
最新推荐文章于 2023-10-24 09:48:04 发布