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 ...
随机推荐
- HDU 6185(打表代码
/** @xigua */ #include <cstdio> #include <cmath> #include <iostream> #include < ...
- linux下面/usr/local和opt目录有何区别
/usr/local下一般是你安装软件的目录,这个目录就相当于在windows下的programefiles这个目录 .很多应用都安装在/usr/local下面,那么,这些应用为什么选择这个目录呢?答 ...
- Ajax复习
1.标准请求响应时浏览器的动作(同步操作) 1.1 浏览器请求什么资源,跟随显示什么资源 2.ajax:异步请求: 2.1 局部刷新,通过异步请求,请求到服务器资源数据后,通过脚本修改页面中部分内容 ...
- IOS 单击手势和cell点击冲突
环境: view上添加tableView,给view添加单击手势,点击cell却走的是手势方法. 解决: UITapGestureRecognizer *tap=[[UITapGestureRecog ...
- 2018.11.14 uoj#34. 多项式乘法(ntt)
传送门 今天学习nttnttntt. 其实递归方法和fftfftfft是完全相同的. 只不过fftfftfft的单位根用的是复数中的东西,而nttnttntt用的是数论里面有相同性质的原根. 代码: ...
- 2018.10.27 loj#6035. 「雅礼集训 2017 Day4」洗衣服(贪心+堆)
传送门 显然的贪心题啊...考试没调出来10pts滚了妙的一啊 直接分别用堆贪心出洗完第iii件衣服需要的最少时间和晾完第iii件衣服需要的最少时间. 我们设第一个算出来的数组是aaa,第二个是bbb ...
- 组合数C(n,m)的四种求解方法
转自:文章 1.暴力求解 C(n,m)=n*(n-1)*...*(n-m+1)/m!,(n<=15): int CF(int n,int m) { ,i,j; ;i--) ans*=i; ;i- ...
- 启动tomcat报错Caused by: java.io.FileNotFoundException: class path resource [io/renren/controller/NodeDataController] cannot be opened because it does not exist
?? 清理项目,再重启服务就好了.........
- Linq高级应用
Linq的应用为我们带来了很大的方便,提高了coding效率,最近看到了一个用linq写的数独游戏算法,让我看到了Linq写的是如此优雅,耳目一新的感觉,以前没有写过这样的代码,同时也感觉到原来Lin ...
- js动态删除某一行,内容超出单元格后超出的部分用省略号代替
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <s ...