SSH RSA host key for has changed and you have requeste

简介:

今天在209服务器上要远程登录另外一台54的服务器,结果用ssh连接提示如下错误:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
[root@NHL ~] # ssh root@10.40.49.54
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 RSA key sent by the remote host is
ed:93:ad:75:be:ff:d0:ce:60:a2:d3:d8:7d:68:a6:a1.
Please contact your system administrator.
Add correct host key  in  /root/ . ssh /known_hosts  to get rid of this message.
Offending RSA key  in  /root/ . ssh /known_hosts :14
RSA host key  for  10.40.49.54 has changed and you have requested strict checking.
Host key verification failed.

RSA host key for 10.40.49.54 has changed and you have requested strict checking.


在网上找资料,原来这是Linux重装或者openssh-server重装引起的,执行以下命令即可 

ssh-keygen -R 10.40.49.54

10.40.49.54换成你要连的服务器就可以了。

1
2
3
4
5
6
7
8
9
10
11
12
[root@NHL ~] # ssh-keygen -R 10.40.49.54
# Host 10.40.49.54 found: line 14 type RSA
/root/ . ssh /known_hosts  updated.
Original contents retained as  /root/ . ssh /known_hosts .old
[root@NHL ~] # ssh root@10.40.49.54     
The authenticity of host  '10.40.49.54 (10.40.49.54)'  can't be established.
RSA key fingerprint is ed:93:ad:75:be:ff:d0:ce:60:a2:d3:d8:7d:68:a6:a1.
Are you sure you want to  continue  connecting ( yes /no )?  yes
Warning: Permanently added  '10.40.49.54'  (RSA) to the list of known hosts.
no such identity:  /root/ . ssh /id_rsa : No such  file  or directory
no such identity:  /root/ . ssh /id_dsa : No such  file  or directory
root@10.40.49.54's password:

我才想起来前几天我在54那台服务器上升级过ssh





      本文转自ling118 51CTO博客,原文链接:http://blog.51cto.com/meiling/1426103,如需转载请自行联系原作者




相关文章
|
29天前
|
网络协议 Shell 网络安全
ssh: connect to host github.com port 22: Connection refused
本文讨论了在使用Git命令操作GitHub时遇到的"ssh: connect to host github.com port 22: Connection refused"错误,分析了可能的原因,并提供了使用443端口或https协议作为解决方案,最终确定问题是由于DNS解析错误导致,通过修改hosts文件解决。
ssh: connect to host github.com port 22: Connection refused
|
2月前
|
网络安全 开发工具 git
【git】解决git报错:ssh:connect to host github.com port 22: Connection timed out 亲测有效
【git】解决git报错:ssh:connect to host github.com port 22: Connection timed out 亲测有效
566 1
|
4月前
|
安全 网络安全
jsch 报错 no matching host key type found. Their offer: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha> 如何处理
【5月更文挑战第24天】jsch 报错 no matching host key type found. Their offer: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha> 如何处理
250 1
|
4月前
|
算法 网络安全
Unable to negotiate with 127.0.0.1 port 29215: no matching host key type found. Their offer: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha> 解决
【5月更文挑战第5天】Unable to negotiate with 127.0.0.1 port 29215: no matching host key type found. Their offer: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha> 解决
217 7
|
4月前
|
弹性计算 运维 Shell
基于key验证多主机ssh访问
【4月更文挑战第30天】
66 1
|
4月前
|
分布式计算 Hadoop 网络安全
[m1pro ] ssh: connect to host localhost port 22: Connection refused
[m1pro ] ssh: connect to host localhost port 22: Connection refused
|
4月前
|
安全 网络安全
jsch 报错 no matching host key type found. Their offer: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha>问题处理方法
【5月更文挑战第10天】jsch 报错 no matching host key type found. Their offer: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha>问题处理方法
245 0
|
4月前
|
算法 网络安全
no matching host key type found. Their offer: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha> 问题解决
【5月更文挑战第8天】no matching host key type found. Their offer: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha> 问题解决
437 0
|
4月前
|
存储 弹性计算 算法
SSH学习(三)- SSH协议中的Public Key Algorithm
在SSH协议中,有两个地方涉及到公钥算法,分别是: 1. 服务端认证:服务端在进行密钥协商的时候证明自己身份,防止中间人攻击,此时为SSH-TRANS协议发生的事情; 2. 客户端认证:客户端通过PublicKey方式证明自己身份,完成SSH登录认证,此时SSH-USERAUTH发生的事情; 这两种情况下的公钥算法使用的是同一个概念,接下来本文将主要基于PublicKey公钥认证方式,学习对应的内容。
302 1
SSH学习(三)- SSH协议中的Public Key Algorithm
|
4月前
|
网络安全 数据安全/隐私保护
如何使用ssh key免密码登录服务器?
如何使用ssh key免密码登录服务器?