rpm -qa |grep openssh vi /etc/ssh/sshd_config PasswordAuthentication yes PermitRootLogin yes systemctl restart sshd to install the telnet service, you can log in to the machine directly with telnet ip (you must use a normal user) to prevent ssh upgrades from being unavailable and unable to log in to the machine yum install -y telnet -server yum install -y xinetd systemctl start telnet.socket systemctl start xinetd echo'pts /0' >>/etc/securetty echo'pts /1' >>/etc/securetty systemctl restart telnet.socket yum install telnet.x86_64 exit useradd test passwd test exit Find another machine to test whether telnet ip can log in normally Download the openssl-8.3 installation package cd /home/ ll mkdir sshpackage cd sshpackage/ ll wget http://www.zlib.net/zlib-1.2.11.tar.gz wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz wget http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-8.3p1.tar.gz ls -l rm -f openssh-8.3p1.tar.gz ll rz ll 解压编译zlib-1.2.11 tar zxf zlib-1.2.11.tar.gz ll cd zlib-1.2.11/ ./configure --prefix=/usr/local/zlib make && make install 解压编译openssl-1.1.1g tar -xvf openssl-1.1.1g.tar.gz cd .. ll tar -xvf openssl-1.1.1g.tar.gz cd openssl-1.1.1g/ ./config --prefix=/usr/local/ssl -d shared make && make install echo '/usr/local/ssl/lib' >> /etc/ld.so.conf ldconfig -v cd .. 解压编译openssh-8.3p1 tar -xvf openssh-8.3p1.tar.gz cd openssh-8.3p1/ ./configure --prefix=/usr/local/openssh --with-ssl-dir=/usr/local/ssl --with-zlib=/usr/local/zlib make && make install 修改配置 vi /usr/local/openssh/etc/sshd_config PasswordAuthentication yes PermitRootLogin yes 备份升级替换ssh mv /etc/ssh/sshd_config /etc/ssh/sshd_config.bak cp /usr/local/openssh/etc/sshd_config /etc/ssh/sshd_config mv /usr/sbin/sshd /usr/sbin/sshd.bak cp /usr/local/openssh/sbin/sshd /usr/sbin/sshd mv /usr/bin/ssh /usr/bin/ssh.bak cp /usr/local/openssh/bin/ssh /usr/bin/ssh mv /usr/bin/ssh-keygen /usr/bin/ssh-keygen.bak cp /usr/local/openssh/bin/ssh-keygen / usr/bin/ssh-keygen mv /etc/ssh/ssh_host_ecdsa_key.pub /etc/ssh/ssh_host_ecdsa_key.pub.bak cp /usr/local/openssh/etc/ssh_host_ecdsa_key.pub /etc /ssh/ ssh_host_ecdsa_key pubctl restart ssh -V After everything is normal, log in again and close the telnet service systemctl stop telnet.socket systemctl stop xinetd
Openssh upgrade to 8.3 version history retention
Guess you like
Origin blog.51cto.com/superleedo/2535233
Recommended
Ranking