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 ...
随机推荐
- 数位dp小结
数位dp其实就是一种用来求区间[l, r]满足条件的数的个数.数位是指:个十百千万,而在这里的dp其实相当于暴力枚举每一位数. 我们通过把l, r的每位数分解出来,然后分别求r里满足条件的数有多少,l ...
- 47.iOS跳转AppStore评分和发送邮件
1.跳转到AppStore评分 应用地址是关键:IOS 设备,手机搜索应用,拷贝链接 NSString *appStr =@"https://itunes.apple.com/cn/app/ ...
- 744. Find Smallest Letter Greater Than Target
俩方法都是用二分查找,一个调库,一个自己写而已. 方法一,调库 static int wing=[]() { std::ios::sync_with_stdio(false); cin.tie(NUL ...
- 2018.12.15 poj3415 Common Substrings(后缀自动机)
传送门 后缀自动机基础题. 给两个字符串,让你求长度不小于kkk的公共子串的数量. 这题可以用后缀自动机解决废话 考虑对其中一个字串建出后缀自动机,然后用另一个在上面跑,注意到如果一个状态有贡献的话, ...
- 纯css实现蒙层loading效果
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- 牛客训练五:炫酷路途(c++与dp)
题目链接:传送门 思路:每隔2^i(0<=i<=INF)就有一条路径,所以可以将从头到尾的路线视为一个有向图, 将ai,bi以此输入,然后将路径从小到大排序,不断更新路径. __built ...
- 6. Uniforms in American's Eyes 美国人眼里的制服
6. Uniforms in American's Eyes 美国人眼里的制服 (1) Americans are proud of their variety and individuality,y ...
- hdu6365 2018 Multi-University Training Contest 6 1004 Shoot Game
http://acm.hdu.edu.cn/showproblem.php?pid=6365 细节处理 unique返回的是最后一位的后一位,因此从1开始的数组要减去(p+1) 结构体可以用unqiu ...
- navigtor对象和插件检测
每一个浏览器都内置了属于自己的一套属性和方法 浏览器中navigator对象有plugins属性对象存着插件的数组 每一项包含: name 插件名称 description 插件的描述 filenam ...
- MODULE_DEVICE_TABLE 的作用
pci_device_id,PCI设备类型的标识符.在include/linux/mod_devicetable.h头文件中定义.struct pci_device_id { __u32 ...