年年有"余"

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 2149|回复: 0

[CentOS] WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

[复制链接]
  • TA的每日心情

    2024-10-15 10:05
  • 签到天数: 372 天

    [LV.9]以坛为家II

    发表于 2014-7-24 09:16:59 | 显示全部楼层 |阅读模式
    一、错误提示:

    Last login: Thu Jul 24 08:22:08 on ttys001
    yusiandeMacBook-Pro:~ yusian$ ssh root@yusian.net
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @    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 RSA key sent by the remote host is
    1b:df:79:37:91:ee:9f:1b:c2:c2:14:47:64:4d:f0:9e.
    Please contact your system administrator.
    Add correct host key in /Users/yusian/.ssh/known_hosts to get rid of this message.
    Offending RSA key in /Users/yusian/.ssh/known_hosts:2
    RSA host key for yusian.net has changed and you have requested strict checking.
    Host key verification failed.

    二、出现原因:
    由于更换了远程主机的操作系统,再次通过ssh登录同一个ip时会出现如上所示提示,网上有很多解决办法,说是删除某个文件或修改某个文件,但容易让人误解成修改服务器,事实上是修改终端本地配置

    三、解决办法:
    Add correct host key in /Users/yusian/.ssh/known_hosts to get rid of this message.
    这句话已经说得很清楚了,ssh连接是加密的,本地生成的密钥只能应用于某个连接对,现在远程主机更换,ip又没变,所以ssh之前协商好的加密方式不能使用
    删除临时文件
    rm /Users/yusian/.ssh/known_hosts

    搞定!

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    手机版|小黑屋|Archiver|iOS开发笔记 ( 湘ICP备14010846号 )

    GMT+8, 2024-12-22 17:25 , Processed in 0.054451 second(s), 19 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2021, Tencent Cloud.

    快速回复 返回顶部 返回列表