CentOS7启动SSH服务报:Job for ssh.service failed because the control process exited with error code.......
2018-04-01 22:55
1506 查看
CentOS7启动SSH服务报:Job for ssh.service failed because the control process exited with error codesee systemctl status ssh.service and journalctl -xe for details.然后按照提示输入: systemctl status sshd.service
表示给出的提示很坑爹,完全不知道哪里出错了。经过艰难的百度,可能是SELINUX启用了,并且SELINUX允许的sshd-port跟设置的port不匹配造成的.
1. 查看SeLinux设置的ssh端口# semanage port -l | grep ssh
发现端口22222和22是允许被使用的2.查看 ssh设置的端口# vi /etc/ssh/sshd_config
ssh使用的是默认端口22,与selinux是匹配的。不是这个错。继续百度......终于在ubuntu社区看到一篇帖子:run
可以看到,似乎是sftp组的设置参数似乎有问题# vi /etc/ssh/sshd_config
使用 : set number显示行号. 找到第147行
原来是ForceCommand 写错啦!赶紧改对.....
启动成功!!!!
表示给出的提示很坑爹,完全不知道哪里出错了。经过艰难的百度,可能是SELINUX启用了,并且SELINUX允许的sshd-port跟设置的port不匹配造成的.
1. 查看SeLinux设置的ssh端口# semanage port -l | grep ssh
发现端口22222和22是允许被使用的2.查看 ssh设置的端口# vi /etc/ssh/sshd_config
ssh使用的是默认端口22,与selinux是匹配的。不是这个错。继续百度......终于在ubuntu社区看到一篇帖子:run
sudo /usr/sbin/sshd -Tto see what is wrong with the service and why does it fail.
# /usr/sbin/sshd -T
可以看到,似乎是sftp组的设置参数似乎有问题# vi /etc/ssh/sshd_config
使用 : set number显示行号. 找到第147行
原来是ForceCommand 写错啦!赶紧改对.....
启动成功!!!!
相关文章推荐
- Jenkins 安装启动提示“iJob for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.”
- Dockers Job for docker.service failed because the control process exited with error code
- Centos 7不能上网,Job for iptables.service failed because the control process exited with error code.
- Job for postfix.service failed because the control process exited with error code. See "systemctl st
- Centos 7不能上网,Job for iptables.service failed because the control process exited with error code.
- Job for tomcat.service failed because the control process exited with error code 解决办法:
- 关于nginx的Job for nginx.service failed because the control process exited with error code.错误
- Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details
- 解决Job for docker.service failed because the control process exited with error code. See "systemctl s
- Job for nginx.service failed because the control process exited with error code. See "systemctl stat
- 重启网卡报Job for network.service failed because the control process exited with error code.。。 错误
- centos出现这个错误:Job for sshd.service failed because the control process exited with error code.
- Job for vsftpd.service failed because the control process exited with error code. See "systemctl sta
- 解决Docker启动服务器链接失败-Job for docker.service failed because the control process exited error code
- OpenStack常见错误:无法开启http服务 Job for httpd.service failed because the control process exited with error
- Job for vsftpd.service failed because the control process exited with error code
- mysql.service failed because the control process exited with error code问题
- salt出错Job for salt-master.service failed because the control process exited with error code.
- Job for php-fpm.service failed because the control process exited with error code. See "systemctl st
- gitlab搭建提示inet_interfacesJob for postfix.service failed because the control process exited with erro