升級openssl和openssh


鑒於openssl 1.0.1的安全漏洞, 現在都升級1.0.1g版本的openssl了, 這里記錄下升級流程.

0. 先查看當前安裝的版本

   ssh -V 查看ssh版本

   openssl version -a 查看openssl版本

1. 首先到官網下載新版的源碼包

     openssh: http://www.openssh.com/portable.html 這里, 官網上找到的下載有兩種, 一種是直接下載OpenBSD的(附帶openssh, 顯然不是我等需要的), 另外一種就是這種portable版的

     openssl:  http://www.openssl.org/source/

2. 先安裝openssl, 一定記得加上--shared選項, 否則openssh編譯的時候會找不到新安裝的openssl的library, 會報錯: openssl的 header和library版本不匹配

    ./config --prefix=/usr --shared
    make
    make test
    make install

    完畢后查看openssl版本安裝是否正確

3. 安裝openssh

    ./configure --prefix=/usr --with-pam --with-zlib --with-md5-passwords
     make
     make install

     這種安裝會把sshd的配置文件放在/usr/etc/sshd_config

     需要重啟sshd服務並且重新登錄shell, 才能查看openssh是否已經安裝新版本, 建議先保留安裝openssh的這個shell, 另開一個shell測試, 防止設置錯誤導致服務器無法連接

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM