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


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