阿里云99元服务器,新老用户均可买,99元/年续费到2027年,396元4年,多配置特价...
SSH登录Linux服务器提示Host key verification failed.如何解决?新手站长网分享:
Host key verification failed.解决方法
ssh登录Linux服务器时提示如下:文章源自新手站长-https://xinshouzhanzhang.com/host-key-verification-failed.html
aliyunbaike@aliyundeMacBook-Pro:~$ ssh root@47.74.190.156 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ 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:Ms+BRn93GbOO1fwP6g1O+UwSRFv9KIUMGeoHDt70OfQ. Please contact your system administrator. Add correct host key in /Users/aliyunbaike/.ssh/known_hosts to get rid of this message. Offending ECDSA key in /Users/aliyunbaike/.ssh/known_hosts:6 ECDSA host key for 47.74.190.156 has changed and you have requested strict checking. Host key verification failed.
报错:ECDSA host key for xx has changed and you have requested strict checking.
Host key verification failed.,这是由于之前连接过,ssh会默认保存该ip的连接协议信息,当我们再次访问此ip服务器时,ssh会自动匹配之前ssh保存的信息,如果我们对服务器信息作出更改后(例如:重装系统),就会导致本地保存的ssh信息失效,就会报错。文章源自新手站长-https://xinshouzhanzhang.com/host-key-verification-failed.html
解决方法
解决方法:删除本地known_hosts保存的该服务器IP的ssh缓存信息即可。文章源自新手站长-https://xinshouzhanzhang.com/host-key-verification-failed.html
执行命令:ssh-keygen -R "你的远程服务器ip地址"
文章源自新手站长-https://xinshouzhanzhang.com/host-key-verification-failed.html
删除本地的ssh keygen信息后,再次通过ssh root@ip登录应该就不会报错了。文章源自新手站长-https://xinshouzhanzhang.com/host-key-verification-failed.html 文章源自新手站长-https://xinshouzhanzhang.com/host-key-verification-failed.html
【阿里云99元服务器】入口2核2G3M带宽、新老用户同享、99元/年续费到2027年
2023阿里云优惠活动:xinshouzhanzhang.com/go/aliyun
注意:以上特价轻量服务器限制条件为“产品首单特惠”,如果你的腾讯云账号已经是老用户,建议重新注册一个腾讯云账号,如果你是新用户符合条件,那么无脑入,确实值得。