欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Centos7.8怎么更新openssh? Centos升級openssh的技巧

  發(fā)布時(shí)間:2023-09-02 09:47:40   作者:佚名   我要評論
Centos7.8怎么更新openssh?Centos7.8系統(tǒng)想要安裝openssh,該怎么安裝呢?下面我們就來看看Centos升級openssh的技巧

給大家分享一下Centos7.8如何更新安裝openssh的經(jīng)驗(yàn)。從版本7.4p1更新到9.4p1

安裝telnet工具。(為了避免在升級的過程中斷開)

#yum -y install telnet*

啟用telnet服務(wù)

#systemctl enable telnet.socket
#systemctl start telnet.socket

關(guān)閉或者修改安全配置文件

注:(否則root無法telnet登錄)

#mv /etc/securetty /etc/securetty.bak

使用telnet登錄系統(tǒng),準(zhǔn)備升級Openssh

使用xftp工具上傳更新包。

解壓縮安裝包

#tar -zxvf openssh-9.4p1.xx

切換至安裝包目錄,執(zhí)行配置腳本。

# cd openssh-9.4p1-xx
# ./configure --prefix=/usr/local/openssh --with-zlib=/usr/local/zlib --with-ssl-dir=/usr/openssl

執(zhí)行編譯并編譯安裝

# make && make install

卸載原系統(tǒng)yum安裝的openssh包

# yum remove openssh

在/etc目錄下面新建ssh目錄

# mkdir -p /etc/ssh

拷貝openssh安裝目錄下的配置文件至/etc/ssh目錄下

# cp /usr/local/openssh/etc/* /etc/ssh/

編輯sshd_config配置文件

修改如圖所示的三個(gè)地方,保存退出。

# vi /etc/ssh/sshd_config
#wq

復(fù)制文件到相應(yīng)的系統(tǒng)文件夾

# cp /home/manager/openssh-9.4p1/contrib/redhat/sshd.init /etc/init.d/sshd
# cp /usr/local/openssh/sbin/sshd /usr/sbin/sshd
# cp /usr/local/openssh/bin/ssh /usr/bin/ssh
# cp /usr/local/openssh/bin/ssh-keygen /usr/bin/ssh-keygen

添加sshd系統(tǒng)啟動(dòng),并啟動(dòng)sshd服務(wù)

# chkconfig --add sshd
# systemctl start sshd.service

查看openssh 運(yùn)行狀態(tài),并添加openssh 開機(jī)自啟服務(wù)。

查看openssh和openssl 版本

# systemctl status sshd.service
# systemctl enable sshd.service
# ssh -V

注意事項(xiàng):

本步驟操作的前提:已經(jīng)升級了系統(tǒng)openssl版本,應(yīng)openssh依賴于openssl的原因,必須先升級openssl

以上就是Centos7.8更新openssh的技巧,希望大家喜歡,請繼續(xù)關(guān)注腳本之家。

相關(guān)文章

最新評論