systemctl status ssh.service 服务重启出现报错
Case:
ubuntu在从Ubuntu 16.04 LTS 升级到18.04 的时候,执行 do-release-upgrade -d 后,发现ssh无法登陆服务器,
Solution:
1、通过ssh -v root@77.75.154.11,发现如下报错:
OpenSSH_7.2p2 Ubuntu-4ubuntu2.4, OpenSSL 1.0.2g 1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 77.75.154.11 [77.75.154.11] port 22.
debug1: connect to address 77.75.154.11 port 22: Connection refused
ssh: connect to host 77.75.154.11 port 22: Connection refused
2、通过登陆console 去查看ssh.service服务是否有问题。

3、查看sshd_config配置文件(/etc/ssh/sshd_config)是否配置错误
A: /usr/sbin/sshd -T

B: /usr/sbin/sshd -ddd

4、可以发现可能是
/etc/ssh/sshd_config 里面Ciphers配置文件有问题,故需要检查相关的Ciphers是否支持并正确被配置。通过以下命令检查:
使用 "sshd -t -o Ciphers=..." 命令一个个测试来找到有问题的cipher。
或者可以尝试下面这段代码(将您文件的84行中的所有cipher复制到echo命令中)进行批量测试:
for c in $(echo 'aes128-ctr,aes192-ctr,...' | sed -e "s/,/ /g");
sshd -t -o Ciphers=$c
done
5、发现确实有不支持的Ciphers配置,把 blowfish-cbc开始的ciphers 直接都删除,保留如下:

直接删除,然后重启 systemctl status ssh.service
ssh.service服务正常启动。
至此以上ssh登陆问题解决!
systemctl status ssh.service 服务重启出现报错的更多相关文章
- Job for ssh.service failed because the control process exited with error code. See "systemctl status ssh.service" and "journalctl -xe" for details.
1.按照提示 systemctl status ssh.service 查看报错原因 sshd -t 2.结果 /etc/ssh/sshd_config line 34: missing argume ...
- 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 ...
- nginx启动报错:Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' fo
一.背景 这个错误在重启nginx或者启动nginx的时候,经常会出现.我之前也一直认为出现这个错误是因为有程序占用了nginx的进程.但是知其然不知其所以然.每次报错都有点懵逼,所以这边一步步排查错 ...
- 启动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 ...
- kali linux重启网卡失败:Job for networking.service failed because the control process exited with error code. See "systemctl status networking.service" and "journalctl -xe" for details. 问题排查
linux菜鸡的时候,总是为了配置网络而烦恼,重启网卡的原因有很多,我这次是因为配置了固定IP[使用第三方工具连接]所以需要重启网卡,出现 Job for networking.service fai ...
- 配置svn,httpd启动报错 Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
查看httpd的状态,发现80端口被占用,因为我的nginx的80端口. systemctl status httpd.service 解决: 把Apache的端口该成别的端口 vi /etc/ht ...
- Linux 重启网卡失败 Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.
linux下重启网卡使用命令 : service network restart 时报错: [root@slave01 hadoop]# service network restart Startin ...
- docker离线安装 启动报错Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
安装报错的提示:systemctl status docker.service 好吧,原来是缺少库文件.验证一下想法吧,yum -y install libseccomp 成功后,再启动docker发 ...
- Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
环境:Ubuntu 16.04.1 + Django 1.11.15 + Apache 2.4.18 + python 3.5 此篇文章内容提到的第几步,对照以下链接中的步骤 百度云的ubuntu1 ...
随机推荐
- 手动安装sublime插件babel-sublime
(一)手动安装babel 在开发reactjs开发使用sublime时,想要代码高亮显示,需要安装babel-sublime插件,在Preferences中的Package Control菜单搜索In ...
- 【转】numpy-array自带的迭代器-----np.nditer
转自:https://www.jianshu.com/p/f2bd63766204 it = np.nditer(x, flags=['multi_index'], op_flags=['readwr ...
- nginx 查看版本 查看模块
如图,简单说 大V看模块,小v看版本. nginx -v //查看版本号 nginx -V //查看版本号和加载模块明细
- java 接口的概念
一:概念 接口是功能的集合.同样可以看做一种数据类型,是比抽象类更为抽象的“类”. 接口描述应该具备的方法,并没有具体的实现.具体实现由接口的实现类(相当于接口的子类来完成). 好处: 使功能和实现分 ...
- ASP.NET Razor引入命名空间(视图中数据序列化)
问题描述: 视图有时可以作为保存数据的载体,使用Razor语法给我们带来便捷的同时,也会使我们陷入局限.@可以保存int.bool.string等类型,但却保存不了对象类型,例如Dictionary. ...
- 访问 IIS 元数据库失败解决问题的方法
近日调试一Asp.net程序,出现了“访问 IIS 元数据库失败”的错误信息,最后经过搜索发现了解决问题的方法. 解决方法如下: 1.依次点击“开始”-“运行”. 2.在“运行”栏内输入 “C:\WI ...
- 最新Flume1.7 自定义 MongodbSink 结合TAILDIR Sources的使用
Flume MongodbSink 此mongodb支持3.0 github地址 MongodbSink flume-ng-mongodbsink An Apache Flume Sink that ...
- springboot activiti 整合项目框架源码 shiro 安全框架 druid windows10风格
官网:www.fhadmin.org 此项目为Springboot工作流版本 windows 风格,浏览器访问操作使用,非桌面应用程序. 1.代码生成器: [正反双向](单表.主表.明细表.树形表 ...
- Redis全方位讲解--主从复制
前言 前面介绍了redis持久化和容灾备份,这篇会介绍redis主从复制和redis持久化在主从复制中的一些应用.因为本人没有那么多服务器或机器,所以这里主要介绍下如何在docker容器中搭建主从复制 ...
- 在hue平台上使用oozie工作流调度
在实习期间,公司使用的hue平台做的数仓,下面就简单介绍一下hue的一些使用的注意事项,主要是工作流的使用和调度 进入hue首页: Workflow是工作流,Schedule是调度工作流的,如设置工作 ...