Linux—升级openssh常见的问题与解决方案

1.ssh时报错WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

具体报错信息:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

@ 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:rsUbLyXFUzokBD7SLZZmxxxxxxxxx.

Please contact your system administrator.

Add correct host key in /home/skadmin/.ssh/known_hosts to get rid of this message.

Offending ECDSA key in /home/skadmin/.ssh/known_hosts:33

Host key for xxxxx has changed and you have requested strict checking.

Host key verification failed.

问题分析

服务器 xxx.xxx.xxx.xxx 发送的密钥和你本地 ~/.ssh/known_hosts 文件第 33 行记录的密钥 不一致

解决方式

删除旧的密钥记录

bash 复制代码
ssh-keygen -R xxx.xxx.xxx.xxx

2.查看openssl版本时报错openssl: error while loading shared libraries: libssl.so.3: cannot open shared object f

问题分析

表示 openssl 命令在运行时找不到所需的共享库文件 libssl.so.3。这通常是由于 OpenSSL 库未安装、版本不匹配或库路径配置问题导致的。

解决方式

bash 复制代码
#1.查询libssl.so.3的位置
find / -name libssl.so.3
#例如查出来是/usr/local/openssl3/lib64/libssl.so.3

#2.将上述libssl.so.3加入到系统库路径
ln -sf /usr/local/openssl3/lib64/libssl.so.3 /usr/lib64/libssl.so.3

3.安装OpenSSL报错Can't locate IPC/Cmd.pm in @INC (@INC contains: ...)

Can't locate IPC/Cmd.pm in @INC (@INC contains: /root/Downloads/openssl-3.0.1/util/perl /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . /root/Downloads/openssl-3.0.1/external/perl/Text-Template-1.56/lib) at /root/Downloads/openssl-3.0.1/util/perl/OpenSSL/config.pm line 18.

BEGIN failed--compilation aborted at /root/Downloads/openssl-3.0.1/util/perl/OpenSSL/config.pm line 18.

Compilation failed in require at /root/Downloads/openssl-3.0.1/Configure line 23.

BEGIN failed--compilation aborted at /root/Downloads/openssl-3.0.1/Configure line 23.

问题分析

如果你用一个 Perl 写的部署脚本去升级 OpenSSL,而该脚本用了 IPC::Cmd 来执行命令,那么缺少这个模块会导致脚本本身失败,而不是 OpenSSL 编译失败。

解决方式

bash 复制代码
yum install -y perl perl-IPC-Cmd perl-Data-Dumper perl-Text-Template
相关推荐
聆风吟º6 小时前
CANN开源项目深度实践:基于amct-toolkit实现自动化模型量化与精度保障策略
运维·开源·自动化·cann
Coder个人博客7 小时前
Linux6.19-ARM64 mm mmu子模块深入分析
大数据·linux·车载系统·系统架构·系统安全·鸿蒙系统
较劲男子汉9 小时前
CANN Runtime零拷贝传输技术源码实战 彻底打通Host与Device的数据传输壁垒
运维·服务器·数据库·cann
Doro再努力9 小时前
Vim 快速上手实操手册:从入门到生产环境实战
linux·编辑器·vim
wypywyp10 小时前
8. ubuntu 虚拟机 linux 服务器 TCP/IP 概念辨析
linux·服务器·ubuntu
风流倜傥唐伯虎10 小时前
Spring Boot Jar包生产级启停脚本
java·运维·spring boot
Doro再努力10 小时前
【Linux操作系统10】Makefile深度解析:从依赖推导到有效编译
android·linux·运维·服务器·编辑器·vim
senijusene10 小时前
Linux软件编程:IO编程,标准IO(1)
linux·运维·服务器
不像程序员的程序媛10 小时前
Nginx日志切分
服务器·前端·nginx
忧郁的橙子.10 小时前
02-本地部署Ollama、Python
linux·运维·服务器