SSH登录问题 .ssh/known_hosts和 ECDSA key


问题描述:

fakerdeMacBook-Pro:~ faker$ ssh root@123.***.***.34
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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:xv9d+LHzS3VcVK4PVwMcmzoGRQ5ZPqvDGmdJ0CjCB9o.
Please contact your system administrator.
Add correct host key in /Users/faker/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/faker/.ssh/known_hosts:2
ECDSA host key for 123.***.***.34 has changed and you have requested strict checking.
Host key verification failed.

 

解决方法:

fakerdeMacBook-Pro:~ faker$ ssh-keygen -R 123.***.***.34
# Host 123.***.***.34 found: line 2
/Users/faker/.ssh/known_hosts updated.
Original contents retained as /Users/faker/.ssh/known_hosts.old

 

再次登录成功

fakerdeMacBook-Pro:~ faker$ ssh root@123.***.***.34
The authenticity of host '123.***.***.34 (123.***.***.34)' can't be established.
ECDSA key fingerprint is SHA256:xv9d+LHzS3VcVK4PVwMcmzoGRQ5ZPqvDGmdJ0CjCB9o.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '123.***.***.34' (ECDSA) to the list of known hosts.
root@123.***.***.34's password: 
Last login: Fri Jun  1 10:12:55 2018 from 119.29.96.147

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM