Upgrade OpenSSH - Thanatos

Upgrade OpenSSH

rpm -qa|grep openssh|xargs rpm -e
rpm -qa|grep openssl-devel|xargs rpm -e
mv /etc/ssh /etc/ssh.bak
cd /opt/openssl-1.1.1g
make install
cd /opt
tar xvf openssh-8.4p1.tar.gz
cd /opt/openssh-8.4p1
./configure --prefix=/usr --sysconfdir=/etc/ssh --with-zlib --without-openssl-header-check --with-ssl-dir=/usr/local/openssl --with-privsep-path=/var/lib/sshd
make
make install
install -v -m755 contrib/ssh-copy-id /usr/bin
install -v -m644 contrib/ssh-copy-id.1 /usr/share/man/man1
install -v -m755 -d /usr/share/doc/openssh-8.4p1
install -v -m644 INSTALL LICENCE OVERVIEW README* /usr/share/doc/openssh-8.4p1
ssh -V
echo 'X11Forwarding yes' >> /etc/ssh/sshd_config
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
cp -p contrib/redhat/sshd.init /etc/init.d/sshd
chmod +x /etc/init.d/sshd
chkconfig --add sshd
chkconfig sshd on
chkconfig --list sshd
service sshd restart

添加新评论

电子邮件地址不会被公开,评论内容可能需要管理员审核后显示。