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,如需转载请自行联系原作者




相关文章
|
3月前
|
安全 网络安全 数据安全/隐私保护
解决SSH测试连接GitHub时出现“connection closed by remote host”的问题。
然后使用 `ssh -T git@ssh.github.com`来测试连接。
413 0
|
11月前
|
运维 网络安全
解决ssh: connect to host IP port 22: Connection timed out报错(scp传文件指定端口)
通过这些步骤和方法,您可以有效解决“ssh: connect to host IP port 22: Connection timed out”问题,并顺利使用 `scp`命令传输文件。
10798 7
|
11月前
|
网络协议 Ubuntu Linux
解决ssh: connect to host IP port 22: Connection timed out报错(scp传文件指定端口)
解决 `ssh: connect to host IP port 22: Connection timed out` 报错涉及检查 SSH 服务状态、防火墙配置、网络连通性和主机名解析等多个方面。通过逐步排查上述问题,并在 `scp` 命令中正确指定端口,可以有效解决连接超时的问题,确保文件传输的顺利进行。希望本文提供的解决方案能帮助您快速定位并解决该错误。
2742 3
|
存储 网络安全
Curl error (60): SSL peer certificate or SSH remote key was not OK for https://update.cs2c.com.cn/NS/V10/V10SP2/os/adv/lic/base/x86_64/repodata/repomd.xml [SSL: no alternative certificate subject name matches target host name 'update.cs2c.com.cn']
【10月更文挑战第30天】在尝试从麒麟软件仓库(ks10-adv-os)下载元数据时,遇到 SSL 证书验证问题。错误提示为:`Curl error (60): SSL peer certificate or SSH remote key was not OK`。可能原因包括证书不被信任、证书与域名不匹配或网络问题。解决方法包括检查网络连接、导入 SSL 证书、禁用 SSL 证书验证(不推荐)、联系仓库管理员、检查系统时间和尝试其他镜像。
3510 1
|
网络协议 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
|
网络安全 开发工具 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 亲测有效
5304 1
|
安全 网络安全
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> 如何处理
1225 1
|
算法 网络安全
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> 解决
851 7
|
弹性计算 运维 Shell
基于key验证多主机ssh访问
【4月更文挑战第30天】
158 1
|
安全 网络安全
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>问题处理方法
966 0