openssh和openssl升级


  openssh和openssl漏洞不断升级方法网上很多,最简单的方法是直接更新系统的ssh和openssl,

只升级openssh也可以,但是openssl有漏洞,相当于没用。所以要两个一起来升级,升级顺序一定

是先升级openssl,然后再升级openssh。一定不能反了,否则的话得需要重新编译一次openssh.


  另外升级openssl的风险太大,建议至少打开两个连接终端,而且最好保证的你网络是良好的.

否则升级的时候断了的话你就会很悲剧的跑机房玩去了.


  升级前一定要和研发确认好是否有其它程序使用系统的openssl,比如说apache的mod_ssl模块,如果apache用的是现在的老版本的openssl,那么在你升级openssl之前你应该先将apache进行重新编译,使用新版本的openssl重新编译,替换程序。否则你升级完openssl后apache是用不了的,到时候哭都没地方哭了。


  下面是直接升级系统的openssl和openssh的方法步骤,

 仅供参考[请一定在测试机上进行实验,生产环境请谨慎操作


#Openssl升级:
 
#升级不可中断,升级之前至少打开两个以上的终端窗口.
#安装依赖包:
yum instal pam-devel
 
1.      查看升级前openssl的版本,内核版本,操作系统版本:
# opensslversion
OpenSSL 1.0.0-fips 29 Mar 2010
# uname -r
2.6.32-358.el6.x86_64
# cat /etc/issue
Red Hat Enterprise Linux Server release 6.4 (Santiago)
 
2.      上传解压并安装包update_openss.tar.gz:
# tar -zxvf update_openss.tar.gz
#cd update_openss
#tar -zxvf openssl-1.0.1o.tar.gz
#cd openssl-1.0.1o
 
3.      软件配置,编译,安装:
# ./config --prefix=/usr --shared
# make
# make install
 
4. 查看openssl的版本号,验证openssl的版本:
# openssl version
OpenSSL 1.0.1o 12 Jun 2015
Openssh升级:
 
1.进入update_openss目录:
  #cd update_openss
 
2. 解压安装包:

#tar -zxvf openssh-6.8p1.tar.gz
#cd openssh-6.8p1
 
 
3.配置、编译,安装:

./configure --with-zlib --with-ssl-dir --with-pam --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc/ssh

#./configure --prefix=/usr  --sysconfdir=/etc/ssh  \
#--without-zlib-version-check  --with-pam \
#--with-md5-passwords   \
#--with-kerberos5=/usr

make
make install
 
 
重启ssh 服务: service sshd restart
 
1.      验证openssh的版本
 
[root@test54 ~]# ssh -V
OpenSSH_6.8p1, OpenSSL 1.0.1o 12 Jun 2015


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章