WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!


今天用fuel重新搭建openstack环境,在路由器上ssh 172.16.0.2时,发现如下提示:

[root@localhost ~]# 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==

把这一行删除掉;

[root@localhost ~]# 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就可以了。

优质内容筛选与推荐>>
1、Java程序在windows上的调试
2、jquery实现页面控件拖动效果js代码
3、挖坑:CF712E
4、关于 WPF 依赖属性的理解
5、第一篇随笔


长按二维码向我转账

受苹果公司新规定影响,微信 iOS 版的赞赏功能被关闭,可通过二维码转账支持公众号。

    阅读
    好看
    已推荐到看一看
    你的朋友可以在“发现”-“看一看”看到你认为好看的文章。
    已取消,“好看”想法已同步删除
    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号