首页 > 系统相关 >centos7:编译升级 openssh:主要参考“https://github.com/boypt/openssh-rpms”

centos7:编译升级 openssh:主要参考“https://github.com/boypt/openssh-rpms”

时间:2024-04-07 10:45:45浏览次数:25  
标签:systemd github openssh rpms sshd devel yum ssh

参考“https://github.com/boypt/openssh-rpms” 

  “Releases · boypt/openssh-rpms (github.com)

 

安装人家大牛的文档来操作即可。

可选的,自行定制 version.env, 可进行各种组合!

 

Backport OpenSSH RPM / SRPM for old CentOS
A simple script to build latest OpenSSH backport RPMs for older CentOS/RHEL distros.

Similar Project: Backport OpenSSH for Debian / Ubuntu distros

Supported (tested) Distro:
CentOS 5/6/7/8/Stream 8
Amazon Linux 1/2/2023
UnionTech OS Server 20
openEuler 22.03 (LTS-SP1)
AnolisOS 7.9/8.6
Current Version:
OpenSSH 9.7p1 (see: OpenSSH Official)
OpenSSL 3.0.13 / 3.0.9 (FIPS validated, see: OpenSSL Official)
The build script reads version.env for actual version definitions.

Build Requirements:
yum groupinstall -y "Development Tools"
yum install -y imake rpm-build pam-devel krb5-devel zlib-devel libXt-devel libX11-devel gtk2-devel perl perl-IPC-Cmd

# For CentOS5 only:
yum install -y gcc44
Usage
Build RPMs
Install build requirements listed above.
Edit version.env file if necessary.
Download source packages.
./pullsrc.sh
if any error comes up, manally download the source files into the downloads dir. 4. Run the script to build RPMs.

./compile.sh
Install RPMs
# Go go the generated RPMS directory.
cd $(./compile.sh RPMDIR)
pwd
ls
# you will find multiple RPM files in this directory.
# you may copy them to other machines, and continue following steps there.

# Backup current SSH config
[[ -f /etc/ssh/sshd_config ]] && mv /etc/ssh/sshd_config /etc/ssh/sshd_config.$(date +%Y%m%d)

# Install rpm packages. Exclude all debug packages.
find . ! -name '*debug*' -name '*.rpm' | xargs sudo yum --disablerepo=* localinstall -y

# in case host key files got permissions too open.
chmod -v 600 /etc/ssh/ssh_host_*_key

# For CentOS7+:
# in some cases previously installed systemd unit file is left on disk after upgrade.
# causes systemd mixing unit files and initscripts units provided by this package.
if [[ -d /run/systemd/system && -f /usr/lib/systemd/system/sshd.service ]]; then
    mv /usr/lib/systemd/system/sshd.service /usr/lib/systemd/system/sshd.service.$(date +%Y%m%d)
    systemctl daemon-reload
fi

# Check Installed version:
ssh -V && /usr/sbin/sshd -V

# Restart service
service sshd restart
DO NOT DISCONNECET current ssh shell yet, open a NEW shell and login to you machine to verify that sshd is working properly.

Trouble shoot
You may get complains during the yum localinstall process. It's mostly because some subpackages depend on the main openssh package, upgrading only the main package won't fit in their dependencies.

Commonly these packages are needed to be erased before installing built RPMs.

yum erase openssh-askpass openssh-keycat openssh-cavs openssh-askpass openssh-askpass-gnome openssh-debuginfo
If still not satisfied, you may try the final wepon: FORCED INSTALL.

rpm -ivh --force --nodeps --replacepkgs --replacefiles openssh-*.rpm
Use Docker
See file docker.README.md

 

#-------------------------------------------------------------------------------------------------------

安装编译完的rpm包方面,主要就是千万不要轻易的断开当前的ssh客户端连接,当然,如果是在控制台上操作,随便!

 

标签:systemd,github,openssh,rpms,sshd,devel,yum,ssh
From: https://www.cnblogs.com/jinzhenshui/p/18118580

相关文章

  • Running the installer as administrator is disabled by default, see https://githu
    在windows安装scoops提示 网上找到解决办法安装失败-安装scoop失败:“默认情况下,以管理员身份运行安装程序处于禁用状态,请参阅https://github.com/ScoopInstaller/Install#for-admin”-堆栈溢出---failedinstallation-Installingscoopfails:"Runningtheinstal......
  • 使用VPS搭建本地可以访问的gemini(个人记录)参考github,cloudflare,nginx
    第一步:购买一台VPS服务器,可以正常ping通google和baidu,不可细说 第二步:参考这个网站的docker部分,docker到linux服务器中,不使用vercel部署(被墙)https://juejin.cn/post/7317700926826922035docker项目地址:https://github.com/babaohuang/GeminiProChat/blob/main/README_cn.......
  • 国内首款AI音乐生成大模型「天工SkyMusic」并开启免费邀测;SWE-agent 修复GitHub仓库中
    ✨1:天工SkyMusic昆仑万维推出国内首款AI音乐生成大模型「天工SkyMusic」并开启免费邀测天工SkyMusic是由昆仑万维集团开发的一款AI音乐生成工具,它基于先进的「天工3.0」超级大模型构建,代表了目前国内唯一公开可用的AI音乐生成大模型。这款工具专为那些想要借助人工......
  • 从github下载的jar包导入本地maven
    从github下载的jar包导入本地maven1.在github上把代码clone下来2.把下载的代码打成jar包(1)在编译环境打开代码(2)点击file-ProjectStructure...(3)点击Artifacts-加号-JAR-Frommoduleswithdependencies..点击之后会进入这个页面(4)选择copyto...(5)选择src的目录下......
  • GitHub新手用法详解
    GitHub是全球最大的代码托管平台,提供了强大的版本控制和协作功能。无论是个人项目还是团队协作,GitHub都是一个非常实用的工具。本文将为GitHub新手提供一个快速入门指南。基础概念在开始之前,让我们先了解几个基本概念:仓库(Repository):存储项目代码的地方,可以包含文件、文件......
  • 2024年最新github之Javascript语言开源项目top50排行榜项目
    如果有帮助到您还请动动手帮忙点赞,关注,评论转发,感谢啦!......
  • 为 AI 而生的编程语言「GitHub 热点速览」
    Mojo是一种面向AI开发者的新型编程语言。它致力于将Python的简洁语法和C语言的高性能相结合,以填补研究和生产应用之间的差距。Mojo自去年5月发布后,终于又有动作了。最近,Mojo的标准库核心模块已在GitHub上开源,采用Apache2开源协议,开源后迅速受到广泛关注,登上了Gi......
  • GitHub上标星120k的Java进阶面试教程等!(建议收藏
    转发+关注,然后私信回复关键字“888”即可获得我精心整理的《Java开源项目合集》资料八、《JavaFamily》==============【互联网一线大厂面试+学习指南】进阶知识完全扫官。 部分目录:九、《interview_internal_reference》==================================2......
  • github上传大文件(超过100M)
    下载安装windowsinstaller运行windowsinstaller在命令行执行gitlfsinstallLinuxcurl-shttps://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh|sudobashsudoapt-getinstallgit-lfsgitlfsinstallMac安装HomeBrew/usr/......
  • GitHub 2024年【整个3月】流行趋势
    目录趋势所有语言C#JavaPythonJavaScript1.所有语言2.C#3.Java4.Python5.JavaScript6.GitHub流行趋势作用GitHub流行趋势是指在GitHub这一开源代码托管平台上,不同项目的获取星标(star)、贡献(contribution)以及关注度等指标呈现的流行与关注的趋势。这些趋势......