?????博主簡介
????云計算領(lǐng)域優(yōu)質(zhì)創(chuàng)作者
????華為云開發(fā)者社區(qū)專家博主
????阿里云開發(fā)者社區(qū)專家博主
??交流社區(qū):運維交流社區(qū) 歡迎大家的加入!
?? 希望大家多多支持,我們一起進(jìn)步!??
??如果文章對你有幫助的話,歡迎 點贊 ???? 評論 ?? 收藏 ?? 加關(guān)注+??
文章聲明
文章聲明:此文基于實操撰寫 生產(chǎn)環(huán)境:此文升級是基于9.3p1升級9.3p2
ssh -V查看版本是:OpenSSH_9.3p1, OpenSSL 1.0.2k-fips 26 Jan 2017
問題關(guān)鍵字:OpenSSH 升級, OpenSSH 更新, OpenSSH 漏洞修復(fù)
漏洞信息:OpenSSH代理轉(zhuǎn)發(fā)遠(yuǎn)程代碼執(zhí)行漏洞(CVE-2023-38408)
前述
OpenSSH(OpenBSD Secure Shell)是OpenBSD計劃組的一套用于安全訪問遠(yuǎn)程計算機的連接工具。該工具是SSH協(xié)議的開源實現(xiàn),支持對所有的傳輸進(jìn)行加密,可有效阻止竊聽、連接劫持以及其他網(wǎng)絡(luò)級的攻擊。 OpenSSH 8.9版本至9.3之前版本存在安全漏洞,該漏洞源于將智能卡密鑰添加到ssh-agent,會導(dǎo)致忽略每次轉(zhuǎn)發(fā)的目標(biāo)約束。
注:此操作步驟同樣適用于Red Hat系所有 9.x 服務(wù)器系統(tǒng)。
注意事項:
在升級之前,建議打開多個SSH終端連接,并安裝telnet服務(wù)器,確保在SSH服務(wù)器升級異常時,可以通過telnet服務(wù)器遠(yuǎn)程連接,進(jìn)行緊急問題修復(fù)處理。
在升級前一定要備份原有的配置文件,以防出現(xiàn)意外情況。
此文升級是基于9.3p1升級9.3p2(如是7.4升級9.3p2,可參考文章最后的參考文章)
9.3p1升級文檔:【Linux】 OpenSSH_7.4p1 升級到 OpenSSH_9.3p1(親測無問題,建議收藏)
備份openssh9.3p1的配置文件
[root@localhost ~]# mv /usr/sbin/sshd /usr/sbin/sshd-9.3p1
[root@localhost ~]# mv /usr/bin/ssh /usr/bin/ssh-9.3p1
[root@localhost ~]# mv /usr/bin/ssh-keygen /usr/bin/ssh-keygen-9.3p1
[root@localhost ~]# mv /etc/init.d/sshd /etc/init.d/sshd-9.3p1
[root@localhost ~]# mv /etc/pam.d/sshd.pam /etc/pam.d/sshd.pam-9.3p1
如果不需要這些配置可以在升級完成之后確認(rèn)沒有問題再將其刪除
下載 openssh9.3p2 的安裝包:
或者是使用我提供的離線包:openssh7.4p1 升級到 openssh9.3p2 所需的離線包
網(wǎng)盤下載:
鏈接:https://pan.baidu.com/s/1W426VDGwchE9ndKGV-eyxw?pwd=f2um
提取碼:f2um文章來源:http://www.zghlxwxcb.cn/news/detail-713579.html
wget https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.3p2.tar.gz
解壓并編譯安裝OpenSSH9.3p2
# 將下載的openssh安裝包移動到/usr/local下
[root@localhost ~]# mv openssh-9.3p2.tar.gz /usr/local/
# 進(jìn)入/usr/local/目錄解壓openssh9.3
[root@localhost ~]# cd /usr/local/
[root@localhost local]# tar xf openssh-9.3p2.tar.gz
# 進(jìn)入openssh目錄
[root@localhost local]# cd openssh-9.3p2
# 編譯安裝
[root@localhost openssh-9.3p2]# CCFLAGS="-I/usr/local/include" \
LDFLAGS="-L/usr/local/lib64" \
./configure \
--sysconfdir=/etc/ssh \
--with-zlib \
--with-ssl-dir=/usr/local/openssl
[root@localhost openssh-9.3p2]# make -j 4
[root@localhost openssh-9.3p2]# make install
授權(quán)
[root@localhost openssh-9.3p2]# chmod 600 /etc/ssh/*
復(fù)制配置文件
[root@localhost openssh-9.3p2]# cp -rf /usr/local/sbin/sshd /usr/sbin/sshd
[root@localhost openssh-9.3p2]# cp -rf /usr/local/bin/ssh /usr/bin/ssh
[root@localhost openssh-9.3p2]# cp -rf /usr/local/bin/ssh-keygen /usr/bin/ssh-keygen
[root@localhost openssh-9.3p2]# cp -ar /usr/local/openssh-9.3p2/contrib/redhat/sshd.init /etc/init.d/sshd
[root@localhost openssh-9.3p2]# cp -ar /usr/local/openssh-9.3p2/contrib/redhat/sshd.pam /etc/pam.d/sshd.pam
給sshd授予權(quán)限
chmod 755 /etc/init.d/sshd
啟用sshd,生成服務(wù)配置文件,并重啟服務(wù)
# 啟用sshd,生成服務(wù)配置文件
[root@localhost openssh-9.3p2]# systemctl enable sshd
sshd.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig sshd on
# 重啟服務(wù)
[root@localhost openssh-9.3p2]# systemctl restart sshd
# 查看服務(wù)狀態(tài)
[root@localhost openssh-9.3p2]# systemctl status sshd
驗證升級是否成功
[root@localhost ~]# ssh -V
OpenSSH_9.3p2, OpenSSL 1.1.1t 7 Feb 2023
文章來源地址http://www.zghlxwxcb.cn/news/detail-713579.html
相關(guān)文章
文章標(biāo)題 | 文章鏈接 |
---|---|
【Linux】 OpenSSH_7.4p1 升級到 OpenSSH_8.7p1(親測無問題,建議收藏) | https://liucy.blog.csdn.net/article/details/130484944 |
【Linux】 OpenSSH_7.4p1 升級到 OpenSSH_9.3p1(親測無問題,建議收藏) | https://liucy.blog.csdn.net/article/details/131398113 |
【Linux】 OpenSSH_7.4p1 升級到 OpenSSH_9.3p2(親測無問題,建議收藏) | https://liucy.blog.csdn.net/article/details/133460612 |
【Linux】 OpenSSH_9.3p1 升級到 OpenSSH_9.3p2(親測無問題,建議收藏) | https://liucy.blog.csdn.net/article/details/133460539 |
【Linux】 OpenSSH_7.4p1 升級到 OpenSSH_9.4p1(親測無問題,建議收藏) | https://liucy.blog.csdn.net/article/details/133697104 |
【Linux】 OpenSSH_9.3p2 升級到 OpenSSH_9.4p1(親測無問題,建議收藏) | https://liucy.blog.csdn.net/article/details/133682882 |
【Linux】 OpenSSH_9.3p1 升級到 OpenSSH_9.5p1(親測無問題,建議收藏) | https://liucy.blog.csdn.net/article/details/134717718 |
到了這里,關(guān)于【Linux】 OpenSSH_9.3p1 升級到 OpenSSH_9.3p2(親測無問題,建議收藏)的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!