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 服务重启出现报错的更多相关文章

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

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

  3. nginx启动报错:Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' fo

    一.背景 这个错误在重启nginx或者启动nginx的时候,经常会出现.我之前也一直认为出现这个错误是因为有程序占用了nginx的进程.但是知其然不知其所以然.每次报错都有点懵逼,所以这边一步步排查错 ...

  4. 启动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   ...

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

  6. 配置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 ...

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

  8. 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发 ...

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

随机推荐

  1. 1084. [SCOI2005]最大子矩阵【网格DP】

    Description 这里有一个n*m的矩阵,请你选出其中k个子矩阵,使得这个k个子矩阵分值之和最大.注意:选出的k个子矩阵 不能相互重叠. Input 第一行为n,m,k(1≤n≤100,1≤m≤ ...

  2. 【洛谷】【动态规划/背包】P1833 樱花

    [题目描述:] 爱与愁大神后院里种了n棵樱花树,每棵都有美学值Ci.爱与愁大神在每天上学前都会来赏花.爱与愁大神可是生物学霸,他懂得如何欣赏樱花:一种樱花树看一遍过,一种樱花树最多看Ai遍,一种樱花树 ...

  3. Day13 泛型

    泛型 泛型定义 在一个类型(类,接口,方法)之后,定义一个类型参数. 原生类型:类型后面没有指定具体的类型参数. 好处 使用泛型的好处在于,它在编译的时候进行类型安全检查,并且在运行时所有的转换都是强 ...

  4. Linux服务器上安装JDK小白教程

    一.环境 VMware12 Pro CentOS-6.7-i386-bin-DVD1 jdk-8u151-linux-i586 二.详细安装步骤 前提:需要卸载自己Linux上的jdk rpm -qa ...

  5. jenkins 构建触发器 Poll SCM 和 Build periodically区别

    Poll SCM:定时检查源码变更(根据SCM软件的版本号),如果有更新就checkout最新code下来,然后执行构建动作.我的配置如下: */5 * * * * (每5分钟检查一次源码变化) Bu ...

  6. dede:channel二级导航currentstyle属性失效问题

    dede:channel默认只作用在一级导航中,在调用下级导航(type='son')时,发现不起作用. 修改方法:修改 include/taglib/channel.lib.php 第133行.if ...

  7. bootstrap 多选款样式:bootstrap-switch

    有时候,为了美化checkbox后者radio的时候,让用户体验起来更好,jquery里有icheck. bootstrap里有bootstrap-switch,就简单介绍下bootstrap-swi ...

  8. git乌龟http/https以及ssh clone的秘钥配置永久免密码登录设置

    1.安装 安装Git 安装TortoiseGit 乌龟客户端 首先下载安装一个git客户端这个就不多说了基本就是next一直到底 安装后首次新建一个项目project在git服务器上 2.配置 1.注 ...

  9. sar命令使用详解

    一:命令介绍:参考资料:http://linux.die.net/man/1/sar sar(System ActivityReporter系统活动情况报告)是目前Linux上最为全面的系统性能分析工 ...

  10. jQuery选择器(上)

    一.基本选择器  1.ID选择器 $("#id")  2.类选择器 $(".class")  3.元素选择器 $("element")  4 ...