Fedora ssh服务,防火墙服务设置

mac2022-06-30  66

Fedora26 ssh设置

ssh:connection to host 127,0.0.1 port22: Connection refused

首先安装openssh-server     yum install openssh-server

systemctl start sshd.service

查看服务状态:systemctl status sshd.service

 

停止服务  systemctl start sshd.service  

 

 

设置开机自启–方式1

systemctl enable sshd.service

 

设置开机自启–方式2

chkconfig --level 3 sshd on

停止开机自启动

systemctl disable sshd.service

 

防火墙设置firewalld

开启firewall: systemctl start firewalld

查看状态:systemctl status firewalld  

停止:    systemctl disable firewalld

禁用:    systemctl stop firewalld

 

iptables:

停止防火墙: service iptables stop启动防火墙: service iptables start

转载于:https://www.cnblogs.com/zhaocundang/p/8438832.html

最新回复(0)