美文网首页
red hat7.0服务器 无法连接的问题

red hat7.0服务器 无法连接的问题

作者: nice_o | 来源:发表于2018-05-29 12:30 被阅读0次

1.关闭selinux
临时关闭:setenforce 0
永久关闭:修改/etc/selinux/config 文件,将SELINUX=enforcing改为SELINUX=disabled

2.关闭iptables
临时:service iptables stop
永久:chkconfig iptables off

3.red hat ssh无法连接,ftp也无法连接。
查看端口,发现未开放。
开放端口21,依次输入命令

iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT 
iptables-save
service iptables restart

4.查看端口是否开放

image.png
再次尝试连接,连接成功

相关文章

网友评论

      本文标题:red hat7.0服务器 无法连接的问题

      本文链接:https://www.haomeiwen.com/subject/hamojftx.html