首页 > 其他 > 详细

升级openssl和openssh

时间:2020-12-08 09:31:55      阅读:27      评论:0      收藏:0      [点我收藏+]

安装升级openssl

cd openssl-1.1.1h
./config --prefix=/usr --shared && make && make install
echo $?
openssl version

安装升级openssh

cd openssh-8.4p1
./configure --prefix=/usr/ --sysconfdir=/etc/ssh  --with-zlib --with-md5-passwords --with-pam && make && make install
echo $?
ssh  -V

配置bak

mv /etc/init.d/sshd /etc/init.d/sshd.old
cp ./contrib/redhat/sshd.init /etc/init.d/sshd     复制启动文件
chkconfig --add sshd     添加卡机启动脚本
chkconfig sshd on     设置开机启动
chkconfig --list|grep sshd     查看设置结果
ssh -V     查看版本号是否成功
sed -i "32 aPermitRootLogin yes" /etc/ssh/sshd_config     允许root使用密码登录,默认不允许
sed -i "12 aPort 22" /etc/ssh/sshd_config
chmod 600 /etc/ssh/ssh_host_ed25519_key
service sshd restart     重启ssh的服务,可以ssh登录了

关闭telnet:

mv /etc/securetty.bak /etc/securetty
chkconfig  xinetd off
service xinetd stop
service iptables start
chkconfig iptables on

注意 默认端口22,防火墙关闭,开启telnet23端口

升级openssl和openssh

原文:https://www.cnblogs.com/liangchen4/p/14100750.html

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