当前位置: 首页 > 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.lryc.cn/news/505894.html

相关文章:

  • vue3前端组件库的搭建与发布(一)
  • COMSOL快捷键及内置函数
  • HUAWEI-eNSP交换机链路聚合(手动负载分担模式)
  • 番外篇 | Hyper-YOLO:超图计算与YOLO架构相结合成为目标检测新的SOTA !
  • 【MATLAB第109期】基于MATLAB的带置信区间的RSA区域敏感性分析方法,无目标函数
  • Bootstrap 表格
  • 【论文阅读】Computing the Testing Error without a Testing Set
  • Visio——同一个工程导出的PDF文件大小不一样的原因分析
  • 【ETCD】ETCD 架构揭秘:内部各组件概览
  • Qt WORD/PDF(四)使用 QAxObject 对 Word 替换(QWidget)
  • 音视频学习(二十四):hls协议
  • UniDepth 学习笔记
  • PVE——OpenWRT 硬盘 size单位的调整
  • Android-ImagesPickers 拍照崩溃优化
  • Linux dd 命令详解:工作原理与实用指南(C/C++代码实现)
  • Golang学习历程【第一篇 入门】
  • 青少年编程与数学 02-004 Go语言Web编程 01课题、Web应用程序
  • 【mysql】如何解决主从架构从库延迟问题
  • 前端学习-获取DOM对象(二十一)
  • PCL点云库入门——PCL库中Eigen数学工具库的基本使用(持续更新)
  • CLion Inlay Hints - 取消 CLion 灰色的参数和类型提示
  • 2025山东科技大学考研专业课复习资料一览
  • vue3 v-model实例之二,tab标签页的实现
  • 东方通TongWeb7.0.4.9M4部署SuperMap iServer 11.2.1
  • QT绘制同心扇形
  • 2012年西部数学奥林匹克试题(几何)
  • 8位移位寄存器的verilog语言
  • 【苍穹外卖】学习心得体会-随笔
  • MySQL学习之表的增删改
  • 电脑excel词典(xllex.dll)文件丢失是或损坏是什么原因?“xllex.dll文件缺失“要怎么解决?