yum install wget gcc -y
yum install -y zlib-devel openssl-devel
yum install pam-devel libselinux-devel zlib-devel openssl-devel -y
# CentOS7安装openssl
https://abc.htmltoo.com/thread-45048.htm
https://openbsd.hk/pub/OpenBSD/OpenSSH/portable/
https://ftp.openssl.org/source/
wget https://openbsd.hk/pub/OpenBSD/OpenSSH/portable/openssh-8.6p1.tar.gz
-删除低版本OpenSSH的的rpm包
rpm -e --nodeps `rpm -qa | grep openssh`
tar -zxvf openssh-8.6p1.tar.gz
cd openssh-8.6p1
可能文件默认显示uid和gid数组都是1000,这里重新授权下。不授权可能也不影响安装
chown -R root.root /data/tools/openssh-8.0p1
./configure --prefix=/usr/ --sysconfdir=/etc/ssh --with-ssl-dir=/usr/local/lib64 --with-zlib --with-md5-passwords --with-pam --with-ssl-engine --with-selinux --with-ipaddr-display
make && make install
cp ssh_config sshd_config /etc/ssh
chmod 600 /etc/ssh/ssh_host_rsa_key /etc/ssh/ssh_host_ecdsa_key /etc/ssh/ssh_host_ed25519_key
cp -a contrib/redhat/sshd.init /etc/init.d/sshd
cp -a contrib/redhat/sshd.pam /etc/pam.d/sshd.pam
chmod u+x /etc/init.d/sshd
vim /etc/ssh/sshd_config
PermitRootLogin yes
PasswordAuthentication yes
chkconfig --add sshd
chkconfig sshd on
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
setenforce 0
systemctl restart sshd
ssh -V
openssl version
签名:这个人很懒,什么也没有留下!