Linux公升級OpenSSH完整手冊

2021-05-01 11:31:40 字數 1662 閱讀 9195

本手冊旨在公升級openssh版本,提公升linux安全性。

在redhat as3 update8和redhat as4 update7上測試成功。

一、 公升級zlib至1.2.3版本

2、 安裝zlib 1.2.3

2、 安裝openssl 0.9.8g

a) tar –zxvf openssl-0.9.8g.tar.gz

b) cd openssl-0.9.8g

c) ./config shared zlib

d) make

e) make install

f) mv /usr/bin/openssl /usr/bin/openssl.off

g) mv /usr/include/openssl /usr/include/openssl.off

h) ln –s /usr/local/ssl/bin/openssl /usr/bin/openssl

i) ln –s /usr/local/ssl/include/openssl /usr/include/openssl

3、 配置庫檔案搜尋路徑

a) echo 「/usr/local/ssl/lib」 >> /etc/ld.so.conf

b) ldconfig –v

4、 檢視openssl的版本號,驗證安裝結果

a) openssl version –a

三、 公升級openssh至5.0p1版本

2、 安裝openssh 5.0p1

a) tar –zxvf openssh-5.0p1.tar.gz

b) cd openssh-5.0p1

c) ./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam --with-ssl-dir=/usr/local/ssl --with-md5-passwords --with-zlib=/usr/local/zlib

d) make

e) make install

3、 配置ssh 5.0p1,增ssh的安全性

a) vi /etc/ssh/sshd_config

b) 將#protocol 2,1修改為protocol 2

c) 將x11forwarding yes修改為x11forwarding no

d) 修改完之後儲存退出

e) 重啟服務service sshd restart 使修改生效

4、 檢視openssh的版本號,驗證安裝結果

a) ssh -v

5、 如果openssh和openssl都是新的版本號就大功告成了。

linux離線公升級openssh

生產環境中的centos7存在openssl版本漏洞的問題,需要對其公升級 三 安裝telnet 四 安裝pam 五 安裝zlib 六 關閉selinux 七 安裝gcc 八 安裝openssl 九 公升級openssh 十 恢復防火牆狀況 gcc rpm.tar.gz openssl 1.0.2o...

公升級openssh版本

有網路情況下 tar zxvf openssh 7.1p1.tar.gz cd openssh 7.1 configure prefix usr sysconfdir etc ssh make make install2 解決如下環境報錯 configure error zlib.h missing...

公升級openssh版本

有網路情況下 tar zxvf openssh 7.1p1.tar.gz cd openssh 7.1 configure prefix usr sysconfdir etc ssh make make install2 解決如下環境報錯 configure error zlib.h missing...