centos升级openssh版本

似乎升级就是简单的安装ssh包就行了,没进行其他修改,虚拟机24个中高低漏洞解决

 

安装最新包:

1.下载:https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.9p1.tar.gz

2.解压:tar -zvxf openssh-7.9p1.tar.gz

3.切目录:cd openssh-7.9p1

4.配置:./configure --prefix=/usr/ --sysconfdir=/etc/ssh/ --with-ssl --with-md5-passwords mandir=/usr/share/man/

5.编译安装:make && make install

6.重启:service sshd restart

 

漏洞扫描报告,升级前后对比

 

 

序号    漏洞名称    影响主机个数    影响主机百分比    出现次数
1    Openssh MaxAuthTries限制绕过漏洞(CVE-2015-5600)    1/1    100%    1
2    OpenSSH auth_password函数拒绝服务漏洞(CVE-2016-6515)    1/1    100%    1
3    OpenSSH 'schnorr.c'远程内存破坏漏洞(CVE-2014-1692)    1/1    100%    1
4    OpenSSH J-PAKE授权问题漏洞(CVE-2010-4478)    1/1    100%    1
5    OpenSSH 安全漏洞(CVE-2016-1908)    1/1    100%    1
6    OpenSSH 远程代码执行漏洞(CVE-2016-10009)    1/1    100%    1
7    OpenSSH do_setup_env函数权限提升漏洞(CVE-2015-8325)    1/1    100%    1
8    OpenSSH 安全限制绕过漏洞(CVE-2016-10012)    1/1    100%    1
9    OpenSSH sshd mm_answer_pam_free_ctx释放后重利用漏洞(CVE-2015-6564)    1/1    100%    1
10    OpenSSH 远程权限提升漏洞(CVE-2016-10010)    1/1    100%    1
11    OpenSSH <=7.2p1 xauth命令注入漏洞(CVE-2016-3115)    1/1    100%    1
12    OpenSSH默认服务器配置拒绝服务漏洞(CVE-2010-5107)    1/1    100%    1
13    SSH 服务支持弱加密算法    1/1    100%    1
14    OpenSSH 'x11_open_helper()'函数安全限制绕过漏洞(CVE-2015-5352)    1/1    100%    1
15    OpenSSH glob表达式拒绝服务漏洞(CVE-2010-4755)    1/1    100%    1
16    Portable OpenSSH 'ssh-keysign'本地未授权访问漏洞    1/1    100%    1
17    OpenSSH 'ssh_gssapi_parse_ename()'函数拒绝服务漏洞    1/1    100%    1
18    OpenSSH auth_parse_options函数信任管理漏洞(CVE-2012-0814)    1/1    100%    1
19    OpenSSH CBC模式信息泄露漏洞(CVE-2008-5161)【原理扫描】    1/1    100%    1
20    OpenSSH 信息泄露漏洞(CVE-2011-4327)    1/1    100%    1
21    OpenSSH 本地信息泄露漏洞(CVE-2016-10011)    1/1    100%    1
22    OpenSSH sshd monitor组件欺骗漏洞(CVE-2015-6563)    1/1    100%    1
23    允许Traceroute探测    1/1    100%    1
24    SSH版本信息可被获取    1/1    100%    1
25    ICMP timestamp请求响应漏洞    1/1    100%    1
26    探测到SSH服务器支持的算法    1/1    100%    1
合计    26
View Code

 

 

 

 

备份文件:cp -rf /etc/ssh /etc/ssh_bk(可忽略

记录原来pid(可忽略

[root@localhost ssh_bk]# ps -aux|grep ssh
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root       2407  0.0  0.0  66240  1240 ?        Ss   Jan04   0:00 /usr/sbin/sshd
root      22018  0.0  0.0 113724  6116 ?        Ss   Jan07   0:01 sshd: root@notty
root      22112  0.0  0.0  57436  2388 ?        Ss   Jan07   0:00 /usr/libexec/openssh/sftp-server
root      56258  0.0  0.0 103332   856 pts/1    S+   11:26   0:00 grep ssh
root      72854  0.0  0.0 113156  5708 ?        Ss   Jan07   0:00 sshd: root@pts/1

rm -f /etc/ssh/ssh_host_*  (只删除密钥对即可,在重启的时候会重新生成)(可忽略

 

 

参考:升级openssh到最新版本

posted @ 2019-01-08 11:48  吃饭睡觉打逗逗  阅读(2579)  评论(2编辑  收藏  举报