红帽系列离线升级 OpenSSH
声明此文档只应用于CentOS 6.x、CentOS 7.x及RedHat 6.x、RedHat 7.x 其它操作系统升级OpenSSh请自行测试。升级失败可能会导致业务受到影响影响范围请根据业务自行评估。已知受到的影响有: scpsftpssh等注意升级版本之前请保证telnet或vnc开启并保持端口常开如有防火墙配置请自行放行telnet及vnc端口升级前确定telnet及vnc服务可以正常使用1.安装包准备名称版本zlib1.3.2OpenSSL1.1.1wOpenSSH10.4p12.安装必要的依赖包[rootlocalhost ~]# yum -y install wget gcc make perl pam-devel libselinux-develOpenSSH下载地址OpenSSHOpenSSL下载地址OpenSSLZlib下载地址Zlib上传 zlib、OpenSSL、OpenSSH 至 /opt 目录下3.安装 zlib 1.3.2[rootlocalhost ~]# cd /opt[rootlocalhost opt]# tar -xf zlib-1.3.2.tar.gz[rootlocalhost opt]# cd zlib-1.3.2[rootlocalhost zlib-1.3.2]# ./configure --prefix/usr/local/zlib --libdir/lib64[rootlocalhost zlib-1.3.2]# make -j cat /proc/cpuinfo|grep processor|wc -l[rootlocalhost zlib-1.3.2]# make install4.安装 OpenSSL 1.1.1.w[rootlocalhost ~]# cd /opt/[rootlocalhost opt]# tar -xf openssl-1.1.1w.tar.gz[rootlocalhost opt]# cd openssl-1.1.1w/[rootlocalhost openssl-1.1.1w]# ./config --prefix/usr/local/openssl shared zlib \--with-zlib-lib/usr/local/zlib/lib\--with-zlib-include/usr/local/zlib/include[rootlocalhost openssl-1.1.1w]# make -j cat /proc/cpuinfo|grep processor|wc -l[rootlocalhost openssl-1.1.1w]# make install[rootlocalhost openssl-1.1.1w]# mv -f /usr/bin/openssl /usr/bin/openssl.bak[rootlocalhost openssl-1.1.1w]# ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl[rootlocalhost openssl-1.1.1w]# mv -f /usr/lib64/libssl.so.1.1 /usr/lib64/libssl.so.1.1.bak[rootlocalhost openssl-1.1.1w]# ln -s /usr/local/openssl/lib/libssl.so.1.1 /usr/lib64/libssl.so.1.1[rootlocalhost openssl-1.1.1w]# mv -f /usr/lib64/libcrypto.so.1.1 /usr/lib64/libcrypto.so.1.1.bak[rootlocalhost openssl-1.1.1q]# ln -s /usr/local/openssl/lib/libcrypto.so.1.1 /usr/lib64/libcrypto.so.1.1[rootlocalhost openssl-1.1.1q]# vim /etc/ld.so.conf[rootlocalhost openssl-1.1.1q]# cat /etc/ld.so.confinclude ld.so.conf.d/*.conf /usr/local/openssl/lib[rootlocalhost openssl-1.1.1q]# ldconfig[rootlocalhost openssl-1.1.1q]# openssl version5.安装 OpenSSH 10.4p1[rootlocalhost ~]# rpm -qa |grep openssh |xargs rpm -e --nodeps[rootlocalhost ~]# mv /usr/bin/ssh /usr/bin/ssh.bak[rootlocalhost ~]# mv /usr/sbin/sshd /usr/sbin/sshd.bak[rootlocalhost ~]# mv /etc/ssh/ /etc/ssh.bak[rootlocalhost ~]# cd /opt/[rootlocalhost opt]# tar -zxvf openssh-10.3p1.tar.gz[rootlocalhost opt]# cd openssh-10.3p1[rootlocalhost openssh-10.4p1]# ./configure --prefix/usr/local/openssh \--sysconfdir/etc/ssh\--with-ssl-dir/usr/local/openssl\--with-zlib/usr/local/zlib\--with-pam\--with-md5-passwords\--without-hardening\--with-ldflags[rootlocalhost openssh-10.4p1]# make -j cat /proc/cpuinfo|grep processor|wc -l[rootlocalhost openssh-10.4p1]# make isntall[rootlocalhost openssh-10.4p1]# ln -s /usr/local/openssh/sbin/sshd /usr/sbin/sshd[rootlocalhost openssh-10.4p1]# ln -s /usr/local/openssh/bin/ssh /usr/bin/ssh[rootlocalhost openssh-10.4p1]# rm -rf /usr/bin/scp[rootlocalhost openssh-10.4p1]# ln -s /usr/local/openssh/bin/scp /usr/bin/scp[rootlocalhost openssh-10.4p1]# rm -rf /usr/bin/ssh-keygen /usr/bin/ssh-keygen[rootlocalhost openssh-10.4p1]# ln -s /usr/local/openssh/bin/ssh-keygen /usr/bin/ssh-keygen[rootlocalhost openssh-10.4p1]# rm -rf /etc/init.d/sshd[rootlocalhost openssh-10.4p1]# rm -rf /usr/lib/system/system/sshd.servece[rootlocalhost openssh-10.4p1]# cat EOF /etc/systemd/system/sshd.service[Unit]DescriptionOpenSSH server daemonDocumentationman:sshd(8)man:sshd_config(5)Afternetwork.target sshd-keygen.serviceWantssshd-keygen.service[Service]TypenotifyEnvironmentFile-/etc/sysconfig/sshdExecStart/usr/local/openssh/sbin/sshd-D$OPTIONSExecReload/bin/kill-HUP$MAINPIDKillModeprocessRestarton-failureRestartSec42s[Install]WantedBymulti-user.target EOF[rootlocalhost openssh-10.4p1]# systemctl daemon-reload[rootlocalhost openssh-10.4p1]# systemctl restart sshd[rootlocalhost openssh-10.4p1]# systemctl enable sshd[rootlocalhost openssh-10.4p1]#sed -i $aCiphers aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,3des-cbc\nMACs hmac-md5,hmac-sha1,umac-64openssh.com,hmac-sha1-96,hmac-md5-96\nKexAlgorithms diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group1-sha1,curve25519-sha256libssh.org /etc/ssh/sshd_config[rootlocalhost openssh-10.4p1]# sed -i /PermitRootLogin/s/^#//g /etc/ssh/sshd_config[rootlocalhost openssh-10.4p1]# sed -i s/^PermitRootLogin.*/PermitRootLogin yes/ /etc/ssh/sshd_config[rootlocalhost openssh-10.4p1]# sed -i s/^#\?Port .*/Port 10022/ /etc/ssh/sshd_config[rootlocalhost openssh-10.4p1]# chmod 400 /etc/ssh/ssh_*_key[rootlocalhost openssh-10.4p1]# ssh -V

相关新闻

如何快速部署Sentora Core:从安装到配置的完整教程

如何快速部署Sentora Core:从安装到配置的完整教程

如何快速部署Sentora Core:从安装到配置的完整教程 【免费下载链接】sentora-core Sentora is a web hosting control panel written in PHP for *NIX 项目地址: https://gitcode.com/gh_mirrors/se/sentora-core Sentora Core是一款基于PHP开发的开源Web托管…

2026/10/27 12:10:12 阅读更多 →
iOS开发 Swift 速记6:枚举(超复杂)

iOS开发 Swift 速记6:枚举(超复杂)

初级代码游戏的专栏介绍与文章目录-CSDN博客 我的github:codetoys,所有代码都将会位于ctfc库中。已经放入库中我会指出在库中的位置。 这些代码大部分以Linux为目标但部分代码是纯C的,可以在任何平台上使用。 源码指引:github源…

2026/10/27 15:58:39 阅读更多 →
iOS开发 Swift 速记7:结构体和类

iOS开发 Swift 速记7:结构体和类

初级代码游戏的专栏介绍与文章目录-CSDN博客 我的github:codetoys,所有代码都将会位于ctfc库中。已经放入库中我会指出在库中的位置。 这些代码大部分以Linux为目标但部分代码是纯C的,可以在任何平台上使用。 源码指引:github源…

2026/10/24 20:24:38 阅读更多 →

最新新闻

Electron桌面应用开发实战:从环境搭建到打包发布全流程

Electron桌面应用开发实战:从环境搭建到打包发布全流程

做前端这些年,我大部分时间都在跟浏览器标签页打交道,直到第一次把桌面应用跑起来,才发现原来自己一直被限制在地址栏和刷新按钮围起来的框框里。Electron这个词,最开始是在某段时间频繁出现在同事的讨论里,一个用HTML…

2026/10/26 12:00:21 阅读更多 →
滑盖智能锁T109深度解析:结构原理、安装调试与故障排查

滑盖智能锁T109深度解析:结构原理、安装调试与故障排查

简介:亚太天能T109滑盖智能锁产品说明书是一份PDF格式的官方技术文档,主要面向智能锁安装人员、终端用户及售后维护者,帮助快速掌握产品安装、配置与常见故障处理。全包仅1个PDF文件,大小4.37MB,内容结构清晰&#xff…

2026/10/27 4:06:49 阅读更多 →
PMSM弱磁控制原理与Simulink建模:高速AGV驱动系统设计指南

PMSM弱磁控制原理与Simulink建模:高速AGV驱动系统设计指南

上个月我在调试一台高速AGV的驱动系统,整车要求空载跑到8m/s,电机转速已经拉到额定点,驱动器的输出电压也顶到了母线电压极限附近。再往上踩速度指令,转速纹丝不动,三相电流反而开始震荡。那会儿我的第一反应就是&…

2026/10/27 7:21:53 阅读更多 →
C++核心知识点:从内存管理到STL的实战指南

C++核心知识点:从内存管理到STL的实战指南

C 这门语言我前前后后折腾了十几年,用它写过嵌入式驱动、做过游戏服务端,也搭过基础组件库。每次看到新人一头扎进"C 核心知识点"这个搜索词,我其实挺感慨的——这门语言的难点从来不是语法多,而是知识点之间的耦合太深…

2026/10/26 12:00:21 阅读更多 →
T109滑盖智能锁怎么装?安装调试与故障排查全攻略

T109滑盖智能锁怎么装?安装调试与故障排查全攻略

简介:亚太天能T109滑盖智能锁产品说明书以PDF格式发布,适合智能锁用户、安装人员与售后维修人员阅读。内容围绕T109系列指纹密码刷卡锁展开,先介绍前面板、后面板、锁体、机械钥匙、电池盒盖等部件名称与功能,再给出完整安装步骤&…

2026/10/27 6:20:47 阅读更多 →
LLM知识降熵:从信息垄断到理解权下放

LLM知识降熵:从信息垄断到理解权下放

你有没有过这种经历:翻开源码注释、论文摘要或者一份专业报告,每个字都认识,连在一起却像天书。想找人聊聊,身边要么没人懂,要么懂的懒得跟你解释。后来我试着把同一段内容丢给一个大语言模型,几秒钟之后&a…

2026/10/27 4:06:50 阅读更多 →

日新闻

周新闻

月新闻

我发现了一个新思路:用 Remotion + Claude Code 像写代码一样自动化生成短视频

我发现了一个新思路:用 Remotion + Claude Code 像写代码一样自动化生成短视频

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/27 13:55:19 阅读更多 →
Windows下 Codex 中 Chrome 和 Computer Use 插件不可用问题排查及解决参考方式:TaoToken 统一 Key 配置与验证

Windows下 Codex 中 Chrome 和 Computer Use 插件不可用问题排查及解决参考方式:TaoToken 统一 Key 配置与验证

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/27 7:21:50 阅读更多 →
黑夜航拍船只数据集训练YOLOV5模型全流程解析

黑夜航拍船只数据集训练YOLOV5模型全流程解析

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/26 8:34:37 阅读更多 →