出现“Host key verification failed”错误--解决

简介: 遇到“Host key verification failed”错误,通常是因为远程主机密钥发生变化,与本地保存的信息不符。这种情况可能是远程主机系统更改或重装等原因导致的。解决方法是根据提示使用`ssh-keygen -f "/root/.ssh/known_hosts" -R "[10.61.0.152]:29022"`命令移除旧的密钥信息,然后重新尝试连接。

ssh的时候报错
image.png
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message. Offending ECDSA key in /root/.ssh/known_hosts:6 remove with:
ssh-keygen -f "/root/.ssh/known_hosts" -R "[10.61.0.152]:29022"
ECDSA host key for [10.61.0.152]:29022 has changed and you have requested strict checking. Host key verification failed.

出现“Host key verification failed”错误通常是因为远程主机的密钥发生了变化,而您本地保存的已知主机密钥信息与实际不匹配。

这可能是由于远程主机的系统进行了更改、重新安装或受到了某些异常情况的影响,导致其密钥发生了变更。
解决:
要解决这个问题,您可以按照给出的提示,使用 ssh-keygen -f "/root/.ssh/known_hosts" -R "[10.61.0.152]:29022" 命令从本地的 known_hosts 文件中删除与该主机相关的旧密钥信息,然后再次尝试连接。

目录
相关文章
|
网络安全 开发工具 git
Unable to negotiate with xx.xxx.xxxx port 22: no matching host key type found. Their offer: ssh-rsa(解决的两种方式)
Unable to negotiate with xx.xxx.xxxx port 22: no matching host key type found. Their offer: ssh-rsa(解决的两种方式)
3536 0
Unable to negotiate with xx.xxx.xxxx port 22: no matching host key type found. Their offer: ssh-rsa(解决的两种方式)
|
4月前
|
开发者 iOS开发
no identity found Command CodeSign failed with a nonzero exit code
no identity found Command CodeSign failed with a nonzero exit code
48 0
|
4月前
|
缓存 数据安全/隐私保护 Windows
ECDSA host key for ... has changed and you have requested strict checking.Host key verification fail
ECDSA host key for ... has changed and you have requested strict checking.Host key verification fail
|
4月前
|
Kubernetes 容器
k8s-unable to connect to the server:x509:certificates signed by unknown authority......
k8s-unable to connect to the server:x509:certificates signed by unknown authority......
213 0
|
10月前
Error from server error dialing backend remote error tls internal error
Error from server error dialing backend remote error tls internal error
86 0
|
安全 网络安全 开发工具
【已解决】Unable to negotiate with 47.98.49.44 port 22: no matching host key type found. Their offer: ssh
Unable to negotiate with 47.98.49.44 port 22: no matching host key type found. Their offer: ssh
435 0
【已解决】Unable to negotiate with 47.98.49.44 port 22: no matching host key type found. Their offer: ssh
服务器重启后 Host key verification failed
服务器重启后 Host key verification failed
132 0
服务器重启后 Host key verification failed
|
Kubernetes 容器
k8s报错:Error from server (NotFound): the server could not find the requested resource (get services h
k8s报错:Error from server (NotFound): the server could not find the requested resource (get services h
|
网络安全 开发工具
Unable to negotiate with XX.XX.XX.XX: no matching host key type found. Their offer: ssh-dss
Unable to negotiate with XX.XX.XX.XX: no matching host key type found. Their offer: ssh-dss
|
jenkins 持续交付 开发工具