openssh安裝/更新教程(CentOS)


由於rpm包版本總落后於tar包,對於想安裝新版本或由於漏洞需要更新到新版本那只能選擇源代方式編譯安裝。

更新執行和安裝一樣的步驟就行了。

 

1.下載

官方網址:http://www.openssh.com/

在頁面左側選擇操作系統進入,Linux對應頁面為:http://www.openssh.com/portable.html

選擇一個鏡像站點進入下載,比如:https://mirrors.evowise.com/pub/OpenBSD/OpenSSH/portable/

拉到頁面最底部,選擇最新版本的openssh下載,如openssh-7.4p1.tar.gz

安裝說明:http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/INSTALL

 

2.安裝

tar -zxf  openssh-7.4p1.tar.gz   #如果提示非tar文件,可在windows下先解壓成.tar文件
cd openssh-7.4p1
./configure                      #檢測環境是否滿足
make                             #編譯
make install                     #安裝
service sshd restart #重啟,似乎不重啟也升級好

 

3.可能出現的問題

1)configure: error: no acceptable C compiler found in $PATH

yum install -y gcc

2)configure: error: *** zlib.h missing – please install first or check config.log

 yum install -y zlib-devel

3)configure: error: *** OpenSSL headers missing – please install first or check config.log

yum install -y openssl-devel

 


免責聲明!

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



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