当前位置: 首页 > news >正文

遇到“REMOTE HOST IDENTIFICATION HAS CHANGED!”(远程主机识别已更改)的警告

连接虚拟机时提示报错:

[insocoper@hq-soc-cap-raw3 ~]$ ssh root@10.99.141.104
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 ED25519 key sent by the remote host is
SHA256:YkUnJhVJ4PpNa5Mnq3JgtBUpPpzb71WjpER9HSTr0fE.
Please contact your system administrator.
Add correct host key in /home/insocoper/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/insocoper/.ssh/known_hosts:1847
Host key for 10.99.141.104 has changed and you have requested strict checking.
Host key verification failed.

这种情况可以由以下几种情况引起:

  1. 服务器端确实更换了它的SSH密钥。
  2. 你的DNS或网络配置导致你连接到了不同的机器。
  3. 可能存在中间人攻击。

        在大多数情况下,特别是如果你确定服务器最近进行了重装或者配置更改,那么最可能的情况是服务器的SSH密钥发生了变化。为了解决这个问题,你需要从known_hosts文件中移除旧的密钥条目,然后重新连接,此时SSH客户端会自动添加新的主机密钥到known_hosts文件中。 

解决办法:

# 命令会移除与10.99.141.104相关的所有条目。 
# 该命令可以删除有关这个主机的所有密钥信息
ssh-keygen -R 10.99.141.104

或者你有权限并且想要手动编辑known_hosts文件,也可以直接打开/home/insocoper/.ssh/known_hosts文件并删除第1847行(根据错误信息中的提示),然后再进行连接。(如果手动删除,要删除干净1847行附近10.99.141.104的密钥信息,因为有关这个主机的密钥信息可以存储的不止一条,如果没有删除所有有关这个主机的条目,则再次连接还会出现这个报错提示。)

再次尝试连接即可解决:

[insocoper@hq-soc-cap-raw3 ~]$ ssh root@10.99.141.104
The authenticity of host '10.99.141.104 (10.99.141.104)' can't be established.
ED25519 key fingerprint is SHA256:YkUnJhVJ4PpNa5Mnq3JgtBUpPpzb71WjpER9HSTr0fE.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '10.99.141.104' (ED25519) to the list of known hosts.
root@10.99.141.104's password: 
Welcome to Ubuntu 24.04.1 LTS (GNU/Linux 6.8.0-41-generic x86_64)* Documentation:  https://help.ubuntu.com* Management:     https://landscape.canonical.com* Support:        https://ubuntu.com/proSystem information as of Wed Dec 18 06:05:19 PM UTC 2024System load:  0.01               Temperature:             68.0 CUsage of /:   2.4% of 432.02GB   Processes:               1039Memory usage: 0%                 Users logged in:         1Swap usage:   0%                 IPv4 address for ens3f0: 10.99.141.104Expanded Security Maintenance for Applications is not enabled.0 updates can be applied immediately.Enable ESM Apps to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo pro statusThe list of available updates is more than a week old.
To check for new updates run: sudo apt updateThe programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.root@localhost:~# 


http://www.mrgr.cn/news/80685.html

相关文章:

  • RV1126平台下的MobileSeg量化指南:高效部署低算力硬件
  • 【韩顺平 Java满汉楼项目 控制台版】MySQL+JDBC+druid
  • Scala的隐式对象,隐式类
  • 搭建分布式Spark集群
  • You need to call SQLitePCL.raw.SetProvider()
  • [创业之路-196]:华为成功经验的总结与教训简单总结
  • 知道一个服务器IP地址,如何attack对方美国
  • 从0开始写android 之xwindow
  • MYSQL 利用concat函数 生成更新或者插入SQL
  • HUAWEI-eNSP交换机链路聚合(手动负载分担模式)
  • go 自己写序列化函数不转义
  • linux安装mysql
  • 二、使用langchain搭建RAG:金融问答机器人--数据清洗和切片
  • Python 在Word文档中插入图片的3种方式(插入到段落、插入到指定位置、插入到每一页)
  • spring\strust\springboot\isp前后端那些事儿
  • 三、使用langchain搭建RAG:金融问答机器人--检索增强生成
  • iClient3D for Cesium 实现限高分析
  • 【Nginx-4】Nginx负载均衡策略详解
  • 阮一峰C语言教程_10字符串
  • 最新ubuntu20.04安装docker流畅教程
  • 数据结构十大排序之(冒泡,快排,并归)
  • 【济大期末数据库】SQL语法速成
  • 跟着AI 学AI开发二,本地部署自己的Chat GPT
  • 解决新安装CentOS 7系统mirrorlist.centos.org can‘t resolve问题
  • NLP-Huggingface基本使用方法
  • 网络攻与防