ubuntu最大的坑就是unmask
openssh-9.4: https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/openssh-9.4.tar.gz
阿里云下载地址:https://mirrors.aliyun.com/pub/OpenBSD/OpenSSH/portable/
mv /etc/ssh /etc/ssh-bak && mv /etc/pam.d/sshd /etc/pam.d/sshd-bak2
apt install -y gcc make zlib1g zlib1g-dev libssl-dev libpam0g-dev
apt-get remove -y openssh-server
tar -zxvf openssh-9.4p1.tar.gz && cd openssh-9.4p1/
./configure --prefix=/usr --sysconfdir=/etc/ssh --with-zlib --with-md5-passwords --with-pam
make && make install
mv /etc/ssh /etc/ssh-9.4 && mv /etc/ssh-bak /etc/ssh && mv /etc/pam.d/sshd-bak2 /etc/pam.d/sshd
systemctl unmask ssh && systemctl restart sshd
systemctl status ssh