码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2018-02-10 15:51:50      阅读:155      评论:0      收藏:0      [点我收藏+]

标签:blog   code   防火墙   port   serve   div   停止   connect   firewall   

Fedora26 ssh设置

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

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

  2. 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

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

标签:blog   code   防火墙   port   serve   div   停止   connect   firewall   

原文地址:https://www.cnblogs.com/xiaobo-Linux/p/8438832.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!