惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Martin Fowler
Martin Fowler
Microsoft Security Blog
Microsoft Security Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Vercel News
Vercel News
Y
Y Combinator Blog
D
DataBreaches.Net
IT之家
IT之家
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园_首页
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
H
Hackread – Cybersecurity News, Data Breaches, AI and More
WordPress大学
WordPress大学
H
Help Net Security
GbyAI
GbyAI
C
Check Point Blog
L
LangChain Blog
小众软件
小众软件
T
The Blog of Author Tim Ferriss
MyScale Blog
MyScale Blog
G
Google Developers Blog
月光博客
月光博客
V
V2EX
M
MIT News - Artificial intelligence
博客园 - 叶小钗

博客园 - swordzj

从源码编译PyQt5的过程 安装qt5的运行环境 四舍六入五成双 用批处理在指定目录启动Notebook 华为S6700交换机的命名规则 给服务器来点压力 配置dovect监听多个端口 php7.4 注意事项 不重启服务器在线扩容FCSAN存储 WSUS安装后部署报CLR20错误 NFS服务端口转发 注册表模拟修改Wsus配置 Linux下删除大量文件 Seafile社区版集成Office Online Server实现office文件预览 Exchange 域用户无权管理邮箱 阿里云ECS(Centos)开启X11的步骤 微软官方提供的免费正版 Windows 8.1/Win10/7/XP/Vista 操作系统虚拟机镜像下载 在VS2012下静态链接MFC的问题 扩展BindingList,防止增加、删除项时自动更新界面而不出现“跨线程操作界面控件 corss thread operation”异常 【转】开源软件是否真的如我们想象中的那样安全?
OpenSSH 9.2P1 aarch64 编译RPM包及升级处理过程
swordzj · 2023-04-19 · via 博客园 - swordzj

本文参考了:OpenSSH 9.2P1升级以及版本显示的处理过程 - 济南小老虎 - 博客园 (cnblogs.com)

openssh源码编译打包成rpm(openssh-8.6p1,aarch64,4.19内核) – lvbibir's blog

一、下载openssh源码

https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.2p1.tar.gz

二、RPM包编译环境

yum install openssl-devel krb5-devel pam-devel rpm-build -y

mkdir /root/rpmbuild/{RPMS,SOURCES,SPECS}

解压缩文件并且存放于具体路径

将 openssh-9.2p1 存放于/root/rpmbuild/SOURCES

将 openssh.spec存放于 /root/rpmbuild/SPECS

注意原始文件路径为: /openssh-9.2p1/contrib/redhat

与之前的文档一样, 需要修改: 注意需要修改openssh.spec

如下三个配置:

%global no_x11_askpass 1

%global no_gnome_askpass 1

三、生成与安装rpm

cd /root/rpmbuild/SPECS

rpmbuild -bb openssh.spec

cd /root/rpmbuild/RPMS/x86_64/

四、备份和升级

cp /etc/pam.d/sshd /etc/pam.d/sshd_bak
cp /etc/ssh/sshd_config /etc/ssh/sshd_config_bak
rpm -Uvh ./*.rpm
cp -r /etc/pam.d/sshd_bak /etc/pam.d/
cp /etc/ssh/sshd_config_bak /etc/ssh/sshd_config
rm -rf /etc/ssh/ssh*key

systemctl daemon-reload

systemctl restart sshd

版本验证

ssh -V

启动文件报错

systemctl restart sshd
Warning: The unit file, source configuration file or drop-ins of sshd.service changed on disk. Run
'systemctl daemon-reload' to reload units.

自定义一份启动文件

vi /usr/lib/systemd/system/sshd.service

[UNIT]
Description=OpenSSH server daemon
After=network.target sshd-keygen.target
Wants=sshd-keygen.target

[Service]
Type=forking
ExecStart=/etc/rc.d/init.d/sshd start
ExecReload=/etc/rc.d/init.d/sshd restart
ExecStop=/etc/rc.d/init.d/sshd stop
PrivateTmp=True

[Install]
WantedBy=multi-user.target

systemctl daemon-reload
systemctl restart sshd