ssh远程登录出现Host key verification failed.解决办法
今天通过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.解决办法的更多相关文章
- Mac电脑远程连接SSH Host key verification failed 解决办法
苹果电脑远程连接SSH出现如下问题: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ...
- SSH连接时出现Host key verification failed的原因及解决方法
SSH连接的时候Host key verification failed. [root@cache001 swftools-0.9.0]# ssh 192.168.1.90@@@@@@@@@@@@@@ ...
- ssh登录,Host key verification failed的几种处理方法
- 修订历史History: 2011.05.22 初稿 - 系统: Ubuntu 10.04LTS - 软件: SSH 使用SSH登录某台机器,有时因为server端的一些变动,会出现以下信 ...
- ssh登录出现 Host key verification failed. 问题
我们使用ssh链接linux主机时,可能出现“Hostkey verification failed.“的提示,ssh连接不成功.可能的提示信息如下: @@@@@@@@@@@@@@@@@@@@@@@@ ...
- Host key verification failed解决
SSH 登录失败:Host key verification failed 由于公钥不一样了,所以无法登录,提示信息是 KEY 验证失败. 解决方法是: 在 /root/.ssh/known_host ...
- ssh中“Host key verification failed.“的解决方案
SSH连接的时候Host key verification failed. ➜ ~ ssh root@192.168.1.88 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ...
- 解决ssh登录Host key verification failed
使用SSH登录某台机器,有时因为server端的一些变动,会出现以下信息: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: R ...
- SSH登录失败:Host key verification failed
转载自:https://help.aliyun.com/knowledge_detail/41471.html 注意:本文相关 Linux 配置及说明已在 CentOS 6.5 64 位操作系统中进行 ...
- 登录ssh时Host key verification failed错误
工作中总是测试不同的路由设备, 路由器的ip都是 192.168.111.1 ,ssh登录的时候总是出现这个错误. macos上,错误如下 spawn ssh -p 22 root@192.168.1 ...
随机推荐
- python程序保存成二进制(不公开源码)
https://www.tiobe.com/ (python语言排行榜) pip install pyinstaller pyinstaller test.py ./test
- 2019.01.22 poj2926 Requirements(状态压缩)
传送门 题意:给一堆五维的点,求最远点对. 思路:跟CF1093G差不多 考虑把正负号状压成一个323232以内的数,然后对于每一类分别求最大最小值再做差更新答案即可. 代码: #include< ...
- ant Design和ant Design mobile的使用,并实现按需加载
1.全局安装yarn npm install -g create-react-app yarn 2.创建react项目,并用yarn start 运行 3.引入antd/引入antd-mobile y ...
- 第07章:MongoDB-CRUD操作--文档--创建
①语法 insert() save() --有修改没有新增 insertOne() [3.2版本新增]向指定集合中插入一条文档数据 insertMany() [3.2版本新增]向指定集合中插入多条文 ...
- DOM中的事件对象和IE事件对象
DOM中的事件对象 IE事件对象 属性/方法 类型 读/写 说明 属性/方法 类型 读/写 说明 bubles Boolean 只读 表明事件是否冒泡 cancleBubble Boolean ...
- VSCode的终端修改
快速打开VSCode的快捷键是:Ctrl + `(反引号) 转自:https://blog.csdn.net/u013517122/article/details/82776607 因本人实在忍受不了 ...
- Keras人工神经网络多分类(SGD)
import numpy as np import pandas as pd from keras.models import Sequential from keras.layers import ...
- asp.net 重写URL方法和封装好的DLL
.net 重写URL方法和封装好的DLL URL重写方法DLL(2.0)
- Hibernate利用JDBC批操作
@org.junit.Test public void testBatch() { session.doWork(new Work() { @Override public void execute( ...
- VHDL基础2
Signals & Variables VHDL 提供了 signal 和 variable 两种对象来处理非静态数据:提供了 constant 和 generic 来处理静态数据. cons ...