赞
踩
安装依赖
sudo apt update 更新库
sudo apt install zlib1g libpam0g-dev libssl-dev
https://blog.csdn.net/qq_42430287/article/details/125539316
备份原文件
mv /etc/init.d/ssh /etc/init.d/ssh.old
cp -r /etc/ssh /etc/ssh.old
# 卸载原openssh
apt-get remove openssh-server openssh-client
tar xf openssh-9.0p1.tar.gz
cd openssh-9.0p1
./configure --prefix=/usr --sysconfdir=/etc/ssh --with-md5-passwords --with-pam --with-zlib --with-ssl-dir=/usr/local/ssl --with-privsep-path=/var/lib/sshd
make
make install
查看版本
ssh -V
根据之前配置修改,保证配置相同
cd /etc/ssh
mv sshd_config sshd_config.default
cp …/ssh.old/sshd_config ./
mv /etc/init.d/ssh.old /etc/init.d/ssh
systemctl unmask ssh
systemctl restart ssh
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。