WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
Posted 潇洒的麦兜
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!相关的知识,希望对你有一定的参考价值。
今天用fuel重新搭建openstack环境,在路由器上ssh 172.16.0.2时,发现如下提示:
[[email protected] ~]# ssh 172.16.0.2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
c3:03:d2:e2:43:26:a0:48:da:6d:87:e2:a6:23:19:10.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending key in /root/.ssh/known_hosts:1
RSA host key for 172.16.0.2 has changed and you have requested strict checking.
Host key verification failed.
原因很简单,重装了一下openstack环境(真特么简单= =。)
解决办法:
vi /root/.ssh/known_hosts
172.16.0.2 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA1ev2GDBFvILQrU9gyCOp9JFuJ/zCeUls5UCRZd27P4TZ2Z6z5Hjn87cFqx/bgZN7HrY1hDkU0JHLXhUpS7KZj21HWgpiNqG+LtG7sQU1xxH/8dw18fm2q/RMYc8Fzc00XQkdctcqK0B4WfsS/s51p7WJSfPGl9PqcVeTB8flQwPLoPfjcrQtr/OeHcAvIScrpJjJK1BBtGO+g77WXlLpaq38c/w+tUw1POxem7cNxmXnOn+L9+KeMcCzy6hpKjZXwyJWqp+Ja1VkRpw77vzR2/xB2ThLCZzMrKJzKk4x3nfwV1Tldds9gSbrlPwFYzYoxjWqUXXIk+HSaVnS/0qH9w==
把这一行删除掉;
[[email protected] ~]# ssh 172.16.0.2
The authenticity of host ‘172.16.0.2 (172.16.0.2)‘ can‘t be established.
RSA key fingerprint is c3:03:d2:e2:43:26:a0:48:da:6d:87:e2:a6:23:19:10.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘172.16.0.2‘ (RSA) to the list of known hosts.
Permission denied (publickey).
修改/etc/ssh/sshd-config文件。
PasswordAuthentication no修改为yes就可以了。
以上是关于WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!的主要内容,如果未能解决你的问题,请参考以下文章
ssh连接出现 WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
解决WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!