麒麟系统升级openssh至9.5p1
<p>当前环境:</p><p><img src="https://img2023.cnblogs.com/blog/2985032/202312/2985032-20231228151221245-391846004.png"></p>
<p>升级openssh需要三个包<code>zlib-1.2.13.tar.gz、openssl-1.1.1t.tar.gz、openssh-9.5p1.tar.gz</code></p>
<p>下载地址:</p>
<p>zlib-1.2.13.tar.gz http://zlib.net/fossils/zlib-1.2.13.tar.gz </p>
<p>openssl-1.1.1t.tar.gz https://www.openssl.org/source/old/1.1.1/openssl-1.1.1t.tar.gz</p>
<p>openssh-9.5p1.tar.gz https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/openssh-9.5.tar.gz</p>
<h1>开始安装</h1>
<p>安装顺序<code>zlib->openssl->openssh</code></p>
<pre class="language-javascript highlighter-hljs"><code>//安装 zlib
tar zxvf zlib-1.2.13.tar.gz
cd zlib-1.2.13
./configure --prefix=/usr/local/zlib
make && make install
//安装 openssl
cd ..
tar zxvf openssl-1.1.1t.tar.gz
cd openssl-1.1.1t
./config --prefix=/usr/local/ssl -d shared
make && make install
echo '/usr/local/ssl/lib' >> /etc/ld.so.conf
//安装 openssh
cd ..
yum -y remove openssh
tar zxvf openssh-9.5p1.tar.gz
cd openssh-9.5p1
./configure --prefix=/usr/local/openssh --with-zlib=/usr/local/zlib --with-ssl-dir=/usr/local/ssl --without-openssl-header-check
make && make install
//配置
echo 'PermitRootLogin yes' >> /usr/local/openssh/etc/sshd_config
echo 'PubkeyAuthentication yes' >> /usr/local/openssh/etc/sshd_config
echo 'PasswordAuthentication yes' >> /usr/local/openssh/etc/sshd_config
cd contrib/redhat/
cp sshd.init/etc/init.d/sshd
chkconfig --add sshd
cp /usr/local/openssh/etc/sshd_config /etc/ssh/sshd_config
cp /usr/local/openssh/sbin/sshd /usr/sbin/sshd
cp /usr/local/openssh/bin/ssh /usr/bin/ssh
cp /usr/local/openssh/bin/ssh-keygen /usr/bin/ssh-keygen
\cp /usr/local/openssh/etc/ssh_host_ecdsa_key.pub /etc/ssh/ssh_host_ecdsa_key.pub
systemctl start sshd.service
chkconfig --add sshd
chkconfig sshd on</code></pre>
<p> 安装完成后</p>
<p><img src="https://img2023.cnblogs.com/blog/2985032/202312/2985032-20231228153326835-2072188710.png"></p><br><br>
来源:https://www.cnblogs.com/xujiecnblogs/p/17932833.html
頁:
[1]