防火墙启动时,启动firewall时ssh连接断开 | 您所在的位置:网站首页 › 乐视云服务还会启用吗安全吗 › 防火墙启动时,启动firewall时ssh连接断开 |
执行“systemctl start firewalld” 时,ssh连接怎么断开了? 正常情况下,firewalld是默认开启ssh服务的,当我们开启firewalld的时候,不会影响ssh连接。这个我们可以通过查看firewall配置文件确认。 命令如下 cat /etc/firewalld/zones/public.xml但其实,防火墙开放服务时,会开放服务的默认端口。可以检查ssh端口是否是默认端口22. [root@localhost services]# cat /etc/ssh/sshd_config |grep Port Port 2666 #GatewayPorts no [root@localhost services]#端口并不是22. 。可以在public.xml文件中添加2666端口,就不会断开ssh连接了。 [root@localhost /]# cat /etc/firewalld/zones/public.xml Public For use in public areas. You do not trust the other computers on networks to not harm your computer. Only selected incoming connections are accepted. [root@localhost /]# |
CopyRight 2018-2019 实验室设备网 版权所有 |