今天通过ssh和域名连接主机:

IcarusdeMacBook-Pro:~ icarus$ ssh root@icarusyu.me

出现了如下错误:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: POSSIBLE DNS SPOOFING DETECTED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The ECDSA host key for icarusyu.me has changed,
and the key for the corresponding IP address 165.227.52.49
is unchanged. This could either mean that
DNS SPOOFING is happening or the IP address for the host
and its host key have changed at the same time.
Offending key for IP in /Users/icarus/.ssh/known_hosts:4
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:dcs240xWGNTvHg1qUkrkg4Pzb1pYzCgzghTHlEG+uZ0.
Please contact your system administrator.
Add correct host key in /Users/icarus/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/icarus/.ssh/known_hosts:3
ECDSA host key for icarusyu.me has changed and you have requested strict checking.
Host key verification failed.

 提示中出现了关键信息:

Add correct host key in /Users/icarus/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/icarus/.ssh/known_hosts:3

  原因是在主机子系统每次成功ssh连接远程操作,都会把你每个你访问过计算机的公钥(public key)都记录在主机的目录/Users/icarus/.ssh/known_hosts下,当下次访问相同子机服务器时,会核对公钥。如果公钥不同,会发出警告,避免你受到DNS Hijack之类的攻击。

解决办法:

进入目录删除文件即可,然后重新连接就能发现连接上了。

IcarusdeMacBook-Pro:~ icarus$ cd ~/.ssh/
IcarusdeMacBook-Pro:.ssh icarus$ ls
known_hosts known_hosts.old
IcarusdeMacBook-Pro:.ssh icarus$ rm known_hosts
IcarusdeMacBook-Pro:.ssh icarus$ ssh root@icarusyu.me
The authenticity of host 'icarusyu.me (165.227.52.49)' can't be established.
ECDSA key fingerprint is SHA256:dcs240xWGNTvHg1qUkrkg4Pzb1pYzCgzghTHlEG+uZ0.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'icarusyu.me,165.227.52.49' (ECDSA) to the list of known hosts.
root@icarusyu.me's password:
Welcome to Ubuntu 16.04.4 LTS (GNU/Linux 4.4.0-116-generic x86_64) * Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage Get cloud support with Ubuntu Advantage Cloud Guest:
http://www.ubuntu.com/business/services/cloud

  

  

ssh远程登录出现Host key verification failed.解决办法的更多相关文章

  1. Mac电脑远程连接SSH Host key verification failed 解决办法

    苹果电脑远程连接SSH出现如下问题: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                     ...

  2. SSH连接时出现Host key verification failed的原因及解决方法

    SSH连接的时候Host key verification failed. [root@cache001 swftools-0.9.0]# ssh 192.168.1.90@@@@@@@@@@@@@@ ...

  3. ssh登录,Host key verification failed的几种处理方法

    - 修订历史History:  2011.05.22   初稿 - 系统: Ubuntu 10.04LTS  - 软件: SSH 使用SSH登录某台机器,有时因为server端的一些变动,会出现以下信 ...

  4. ssh登录出现 Host key verification failed. 问题

    我们使用ssh链接linux主机时,可能出现“Hostkey verification failed.“的提示,ssh连接不成功.可能的提示信息如下: @@@@@@@@@@@@@@@@@@@@@@@@ ...

  5. Host key verification failed解决

    SSH 登录失败:Host key verification failed 由于公钥不一样了,所以无法登录,提示信息是 KEY 验证失败. 解决方法是: 在 /root/.ssh/known_host ...

  6. ssh中“Host key verification failed.“的解决方案

    SSH连接的时候Host key verification failed. ➜ ~ ssh root@192.168.1.88 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ...

  7. 解决ssh登录Host key verification failed

    使用SSH登录某台机器,有时因为server端的一些变动,会出现以下信息: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @    WARNING: R ...

  8. SSH登录失败:Host key verification failed

    转载自:https://help.aliyun.com/knowledge_detail/41471.html 注意:本文相关 Linux 配置及说明已在 CentOS 6.5 64 位操作系统中进行 ...

  9. 登录ssh时Host key verification failed错误

    工作中总是测试不同的路由设备, 路由器的ip都是 192.168.111.1 ,ssh登录的时候总是出现这个错误. macos上,错误如下 spawn ssh -p 22 root@192.168.1 ...

随机推荐

  1. https传输过程嗅探

    C1->浏览器告知服务器自身的信息 length = 165 a5 16 03 01 00 A0 01 00 00 9C 03 03 5E 1C 37 CD 40 [ ^ 7 @] B6 4A ...

  2. Scrapy的安装和基本使用方法

    Scrapy的安装 1. Windows下安装流程: 方法一: 命令行执行pip install scrapy 安装scrapy 注意:如果有anaconda,也可以打开“Anaconda promp ...

  3. ORACLE rollup函数

    rollup函数应用场景: 主要使用在 分组中,将每个分组求汇总值(就是小计),最后再讲所有值(除去小计)求和(就是合计) 当然,使用union 也可以达到同样的效果.先将需要查询的分组查出来,再un ...

  4. 2019.01.02 poj1322 Chocolate(生成函数+二项式定理)

    传送门 生成函数好题. 题意简述:一个袋子里有ccc种不同颜色的球,现要操作nnn次,每次等概率地从袋中拿出一个球放在桌上,如果桌上有两个相同的球就立刻消去,问最后桌上剩下mmm个球的概率. 第一眼反 ...

  5. 2018.10.26 NOIP模拟 性感手枪(搜索)

    传送门 vis[x][y]vis[x][y]vis[x][y]记录这个点是否在之前被搜过,且被搜过的坐标是什么. 然后搜索的时候记录一个循环的下标和不循环的下标就行了. 代码

  6. Java基础-时间类

    关于java中六个时间类的使用和区别 java.util.Date java.sql.Date ,java.sql.Time , java.sql.Timestamp java.text.Simple ...

  7. spring+springMVC+mybatis+maven+mysql环境搭建(二)

    上一篇整合了spring+mybatis,基本上还不是web工程,接下来接入springMVC,Let's go! 一.工程转换成Web工程 首先右击项目-->properties-->p ...

  8. ORACLE 导入的问题

    1.导入报错 我将ORACLE12.2 导出的文件,导入到ORACLE12.1 . IMP-00010: 不是有效的导出文件, 标头验证失败 解决办法: 修改 dmp 文件版本,使用UEDITOR打开 ...

  9. $.cookie is not a function的错误原因

    网上说的原因是:“手残导入2次jquery库文件 ” 是的,就是这个原因.引入了两次jquery.js

  10. T-SQL查询的逻辑处理过程

    对于一个查询SQL而言,通常将其逻辑处理过程分成7个大的阶段 分别是: 1.FROM 2.WHERE 3.GROUP BY 4.HAVING 5.SELECT 6.ORDER BY 7.TOP/OFF ...