0


Debian12升级openssh-9.6p1

下载openssh-9.6p1
https://www.openssh.com/ftp.html

tar xvf  openssh-9.6p1.tar.gz

安装编译器和依赖库

apt-getinstall gcc
apt-getinstall zlib1g-dev
apt-getinstall libssl-dev
apt-getinstallmake

编译

./configure
make

安装

makeinstall

为了使现在版本生效卸载掉以前版本

apt-get remove openssh-client

在更新openssh后修改/etc/systemd/system/multi-user.target.wants/ssh.service服务文件切记在服务修改之前不要重启机器

[Unit]Description=OpenBSD Secure Shell server
Documentation=man:sshd(8) man:sshd_config(5)After=network.target auditd.service
ConditionPathExists=!/etc/ssh/sshd_not_to_be_run

[Service]EnvironmentFile=-/etc/default/ssh
ExecStartPre=/usr/local/sbin/sshd -tExecStart=/usr/local/sbin/sshd -D$SSHD_OPTSExecReload=/usr/local/sbin/sshd -tExecReload=/bin/kill -HUP$MAINPIDKillMode=process
Restart=on-failure
RestartPreventExitStatus=255Type=notify
RuntimeDirectory=sshd
RuntimeDirectoryMode=0755

[Install]WantedBy=multi-user.target
Alias=sshd.service
标签: 运维 debian linux

本文转载自: https://blog.csdn.net/qq_43420088/article/details/135246282
版权归原作者 小刘同学++ 所有, 如有侵权,请联系我们删除。

“Debian12升级openssh-9.6p1”的评论:

还没有评论