1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
tar -xzf openssh-8.7p1.tar.gz
cd /etc/ssh && mkdir –p /root/sshbak && mv ./* /root/sshbak
cd /data/openssh-8.7p1
./configure --prefix=/usr/local/openssh --sysconfdir=/etc/ssh --with-openssl-includes=/usr/local/openssl/include --with-ssl-dir=/usr/local/openssl --with-zlib --with-md5-passwords --with-pam
make && make install
mv /usr/bin/ssh /usr/bin/ssh-bak20210830
ln -s /usr/local/openssh/bin/ssh /usr/bin/ssh
cp -a contrib/redhat/sshd.init /etc/init.d/sshd
cp -a contrib/redhat/sshd.pam /etc/pam.d/sshd.pam
chmod +x /etc/init.d/sshd
chkconfig --add sshd && systemctl enable sshd
mv /usr/lib/systemd/system/sshd.service /data/
chkconfig sshd on
ssh -V
|