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