首页 > 其他 > 详细

OpenSSH升级

时间:2021-09-05 22:03:12      阅读:36      评论:0      收藏:0      [点我收藏+]

脚本

#!/bin/bash
###############################
#Author: sss
#Date: 2021-09-04
#Description: update OpenSSH8.6
###############################
wget https://openbsd.hk/pub/OpenBSD/OpenSSH/portable/openssh-8.6p1.tar.gz
yum remove -y openssh
yum install -y pam* zlib* perl* openssl-devel
tar -zxvf openssh-8.6p1.tar.gz
cd openssh-8.6p1
./configure --prefix=/usr --sysconfdir=/etc/ssh --with-md5-passwords --with-pam --with-tcp-wrappers --with-ssl-dir=/usr --with-zlib=/usr/local/lib64 --without-hardening
make
chmod 600 /etc/ssh/ssh_host*
make install echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
echo "UseDNS no" >> /etc/ssh/sshd_config
cp -a contrib/redhat/sshd.init /etc/init.d/sshd
cp -a contrib/redhat/sshd.pam /etc/pam.d/sshd.pam
chmod +x /etc/init.d/sshd
chkconfig --add sshd
systemctl enable sshd
chkconfig sshd on
/etc/init.d/sshd restart
setenforce 0
sed -i s#SELINUX=enforcing#SELINUX=disabled# /etc/selinux/config

OpenSSH升级

原文:https://www.cnblogs.com/Climber2017/p/15228799.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!