CentOS7启动SSH服务报:Job for ssh.service failed because the control process exited with error code..........

宇智波唐嫣 2019-04-18 12:07:00 1384 收藏 1
版权
面试:你懂什么是分布式系统吗?Redis分布式锁都不会?>>>

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 sudo /usr/sbin/sshd -T to 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 写错啦!赶紧改对.....

启动成功!!!!
————————————————
版权声明:本文为CSDN博主「宇智波唐嫣」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/wxmiy/java/article/details/89740592

CentOS7启动SSH服务报:Job for ssh.service failed because the control process exited with error code的更多相关文章

  1. 启动Nginx服务失败:Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.

    首次接触nginx,安装完使用命令 service nignx restart  后,出现这个错误,并按照提示给出的命令查看错误详情  systemctl status nginx.service   ...

  2. CentOS启动docker1.13失败(Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.)

    一.启动失败 1.启动docker [root@localhost ~]# systemctl start docker Job for docker.service failed because t ...

  3. 虚拟机配置双网卡适配器后(桥接和NAT模式),重新打开后两个适配器的ip都没有了(重启网卡报Job for network.service failed because the control process exited with error code)

    科普双网卡适配器的好处: 我是配了一个桥接模式的网卡和一个NAT模式的网卡,桥接模式,也就是将虚拟机的虚拟网络适配器与主机的物理网络适配器进行交接,虚拟机中的虚拟网络适配器可通过主机中的物理网络适配器 ...

  4. centos7启动httpd服务失败:Job for httpd.service failed because the control process exited with error code.

    centos7启动httpd命令有两个可以用 service httpd start    systemctl start httpd.service 如果出现如下报错 Job for httpd.s ...

  5. Job for ssh.service failed because the control process exited with error code.......

    转载自:https://blog.csdn.net/woailyoo0000/article/details/79782986 笔者最近更新ubuntu系统,在更新之前设置了证书信任文件,重启以后ss ...

  6. Centos7 网络报错Job for iptables.service failed because the control process exited with error code.

    今天在进行项目联系的时候,启动在待机的虚拟机,发现虚拟机的网络设置又出现了问题. 我以为像往常一样重启网卡服务就能成功,但是它却报了Job for iptables.service failed be ...

  7. docker 报错: Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

    centos 启动docker服务报错: Job for docker.service failed because the control process exited with error cod ...

  8. Linux系统Docker启动问题Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service"

    在Liunx中使用Docker, 注: Liunx使用的是在虚拟机下的centOS7版本在刚开始安装Docker时没有任何错误, 但是在后续的docker启动过程中, 出现以下问题: [root@zk ...

  9. Job for redis-server.service failed because the control process exited with error code(Centos 7 设置Redis开机自启报错)

    报错信息如下: Job for redis-server.service failed because the control process exited with error code.  See ...

随机推荐

  1. 全网最详细的Linux命令系列-ls命令

    Linux开始必须要会的命令当属ls,在日常工作中用到ls命令时的频率是很多的,作为一个初学者,可能我只会或者顶多ls -l两种用法.但是ls其实是一个非常实用的指令,ls命令就是list的缩写,ls ...

  2. Qt信号槽源码剖析(一)

    大家好,我是IT文艺男,来自一线大厂的一线程序员 大家在使用Qt开发程序时,都知道怎么使用Qt的信号槽,但是Qt信号槽是怎么工作的? 大部分人仍然不知道:也就是说大家只知道怎么使用,却不知道基于什么原 ...

  3. 整合一套高性能网关Kong

    前言 相信大家对Api网关都比较的熟悉,我们之前的文章也介绍过ASP.NET Core的网关Ocelot,也介绍过Spring Cloud Gateway.说到网关的主要功能,其实总结起来就两个字&q ...

  4. Java(56-64)【IDEA】

    1.IDEA的使用 集成开发软件 eclipse IDEA 第一步:创建新的项目 第二步:空白的project 第三步:modules->java 写在src中 src->package- ...

  5. OpenPAL3:仙三开源版的第二个小目标 Accomplish!

    去年的时候,OpenPAL3 的第一个版本发布 之后,我给 0.2 版本设定了一个小目标:让景天能跑出永安当.当时的第一个版本还只能算是概念验证的版本,没有音乐支持.输入支持,不能直接读取仙剑三的打包 ...

  6. NTP时间同步服务

    NTP时间服务器 作用:ntp主要是用于对计算机的时间同步管理操作. 时间是对服务器来说是很重要的,一般很多网站都需要读取服务器时间来记录相关信息,如果时间不准,则可能造成很大的影响. 部署安装NTP ...

  7. Day07_36_Iterator迭代器

    Iterator Iterator Iterator iterator(); 获取集合所依赖的迭代对象 通过迭代器iterator()中的方法完成集合的迭代(遍历),这种方式是所有集合通用的遍历方法. ...

  8. SQL Server 审计(Audit)

    审计(Audit)用于追踪和记录SQL Server实例,或者单个数据库中发生的事件(Event),审计运作的机制是通过捕获事件(Event),把事件包含的信息写入到事件日志(Event Log)或审 ...

  9. 基于DRV8701的电机驱动设计

    栅极驱动芯片DRV8701使用的一些注意事项

  10. Weekly Contest 138

    1051. Height Checker Students are asked to stand in non-decreasing order of heights for an annual ph ...