# -----openssl安裝
yum install -y gcc gcc-c++ glibc make autoconf openssl openssl-devel pcre-devel pam-devel
yum install -y pam* zlib*
tar xfz openssl-1.1.1k.tar.gz
chown -R root.root openssl-1.1.1k
cd openssl-1.1.1k/
mv /usr/bin/openssl /usr/bin/openssl_bak
mv /usr/include/openssl /usr/include/openssl_bak
./config --prefix=/usr/local/openssl? --此處不能是解壓包的地址损话,安裝目錄與解壓目錄不能相同 话速,負(fù)責(zé)會報(bào)/include/openssl/aes.h' and '/usr/local/openssl/include/openssl/aes.h' are the same file
make && make install
ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/openssl/include/openssl /usr/include/openssl
echo "/usr/local/openssl/lib" >> /etc/ld.so.conf
ldconfig
openssl version -v
#openssh升級
1.安裝依賴包 yum install gcc zlib-devel pam-devel liselinux-devev (pam-devel 一定要裝)
2.下載安裝包 openssh-8.6p1
3.tar -zxvf openssh-8.6p1
4.cd openssh-8.6p1
5. ./configure --prefix=/usr --sysconfdir=/etc/ssh --with-md5-passwords --with-pam --with-zlib --with-tcp-wrappers --with-ssl-dir=/usr/local/openssl --without-hardening? (--with-tcp-wrappers 可能會提示警告 不用管)
6.make && make install
7.vi /etc/ssh/sshd_config
修改兩個(gè)地方
PermitRootlogin yes
PasswordAuthentication yes
8 systemctl restart sshd 堡壘機(jī)應(yīng)該會斷掉一下
9 systemctl status sshd
10 ssh -V