免费爱碰视频在线观看,九九精品国产屋,欧美亚洲尤物久久精品,1024在线观看视频亚洲

      centos7離線升級(jí)openssh,漏洞修復(fù)

      centos7離線升級(jí)openssh,漏洞修復(fù)

      1. 安裝telnet

      yum -y install xinetd telnet-server

      配置/etc/xinetd.d/telnet

      cat > /etc/xinetd.d/telnet <<EOF

      service telnet

      {

      disable = yes

      flags = REUSE

      socket_type = stream

      wait = no

      user = root

      server = /usr/sbin/in.telnetd

      log_on_failure += USERID

      }

      EOF

      配置telnet登錄的終端類型

      cat >> /etc/securetty <<EOF

      pts/0

      pts/1

      pts/2

      pts/3

      EOF

      啟動(dòng)telnet

      systemctl enable xinetd –now

      systemctl enable telnet.socket –now

      2. 下載安裝包

      wget http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-8.8p1.tar.gz

      wget https://www.openssl.org/source/openssl-1.1.1j.tar.gz –no-check-certificate

      wget http://www.zlib.net/zlib-1.2.12.tar.gz

      3. 安裝zlib

      tar -zxvf zlib-1.2.12.tar.gz

      cd zlib-1.2.12

      ./configure –prefix=/usr/local/zlib

      make && make install

      4. 安裝openssl

      tar -zxvf openssl-1.1.1j.tar.gz

      cd openssl-1.1.1j

      ./config –prefix=/usr/local/ssl -d shared

      make && make install

      echo ‘/usr/local/ssl/lib’ >> /etc/ld.so.conf

      ldconfig -v

      openssl version -a

      5. 安裝openssh

      tar -zxvf openssh-8.8p1.tar.gz

      cd openssh-8.8p1

      ./configure –prefix=/usr/local/openssh –with-zlib=/usr/local/zlib –with-ssl-dir=/usr/local/ssl

      make && make install

      配置文件備份和修改

      #sshd_config文件修改

      echo ‘PermitRootLogin yes’ >>/usr/local/openssh/etc/sshd_config

      echo ‘PubkeyAuthentication yes’ >>/usr/local/openssh/etc/sshd_config

      echo ‘PasswordAuthentication yes’ >>/usr/local/openssh/etc/sshd_config

      # 備份原有文件,并將新的配置復(fù)制到指定目錄

      mv /etc/ssh/sshd_config /etc/ssh/sshd_config.bak

      cp /usr/local/openssh/etc/sshd_config /etc/ssh/sshd_config

      mv /usr/sbin/sshd /usr/sbin/sshd.bak

      cp /usr/local/openssh/sbin/sshd /usr/sbin/sshd

      mv /usr/bin/ssh /usr/bin/ssh.bak

      cp /usr/local/openssh/bin/ssh /usr/bin/ssh

      mv /usr/bin/ssh-keygen /usr/bin/ssh-keygen.bak

      cp /usr/local/openssh/bin/ssh-keygen /usr/bin/ssh-keygen

      mv /etc/ssh/ssh_host_ecdsa_key.pub /etc/ssh/ssh_host_ecdsa_key.pub.bak

      cp /usr/local/openssh/etc/ssh_host_ecdsa_key.pub /etc/ssh/ssh_host_ecdsa_key.pub

      # 修改systemd參數(shù)(去掉Type或改為Type=simple)

      vim /usr/lib/systemd/system/sshd.service

      [Unit]

      Description=OpenSSH server daemon

      Documentation=man:sshd(8) man:sshd_config(5)

      After=network.target sshd-keygen.service

      Wants=sshd-keygen.service

      [Service]

      #Type=notify

      Type=simple

      EnvironmentFile=/etc/sysconfig/sshd

      ExecStart=/usr/sbin/sshd -D $OPTIONS

      ExecReload=/bin/kill -HUP $MAINPID

      KillMode=process

      Restart=on-failure

      RestartSec=42s

      [Install]

      WantedBy=multi-user.target

      重啟sshd服務(wù)

      systemctl daemon-reload

      systemctl restart sshd

      systemctl status sshd

      # 驗(yàn)證是否升級(jí)成功

      ssh -V

      鄭重聲明:本文內(nèi)容及圖片均整理自互聯(lián)網(wǎng),不代表本站立場(chǎng),版權(quán)歸原作者所有,如有侵權(quán)請(qǐng)聯(lián)系管理員(admin#wlmqw.com)刪除。
      (0)
      用戶投稿
      上一篇 2022年7月12日 15:26
      下一篇 2022年7月12日 15:26

      相關(guān)推薦

      • 一篇學(xué)會(huì)如何使用Vite重構(gòu)Vue3項(xiàng)目

        前言 截止發(fā)文時(shí)間,vite正式版已經(jīng)發(fā)布快2年時(shí)間了,vue3也發(fā)布到3.2版本了,它的周邊設(shè)施基本上已經(jīng)齊活了。也是時(shí)候再次重構(gòu)下我那個(gè)vue3.0的開源項(xiàng)目了。 本篇文章就記…

        2022年8月16日
      • 推薦8種網(wǎng)站在線工具(你知道的網(wǎng)站在線工具有哪些)

        一直以來(lái)我都抱著“欲行其事必先利其器”的原則來(lái)處理工作和娛樂(lè),不過(guò)用的久了還是發(fā)現(xiàn)一些問(wèn)題。 比如想合并一下圖片或者簡(jiǎn)單PS下圖片,我也知道photoshop好,但是拜托我的要求很…

        2022年10月16日
      • Python入門系列(六)一篇學(xué)會(huì)python函數(shù)

        函數(shù) 函數(shù)是只在調(diào)用時(shí)運(yùn)行的代碼塊。 def my_function(): print(“Hello from a function”)my_functio…

        2022年8月22日
      • 《夜族崛起》賣出250萬(wàn)份 未來(lái)更新細(xì)節(jié)即將公布

        在6月17日達(dá)成售出200萬(wàn)套的目標(biāo)后,Stunlock Studios的生存動(dòng)作RPG游戲《夜族崛起》(V Rising)又創(chuàng)下了新的銷售里程碑?,F(xiàn)在這款游戲已經(jīng)賣出了250萬(wàn)份…

        2022年8月10日
      • mybatis : 靜態(tài)代理 + jdk動(dòng)態(tài)代理

        背景 有時(shí)目標(biāo)對(duì)象不可直接訪問(wèn),只能通過(guò)代理對(duì)象訪問(wèn) 圖示: 示例1:房東 ===> 目標(biāo)對(duì)象房屋中介 ===> 代理對(duì)象你,我 ===> 客戶端對(duì)象 示例2:運(yùn)…

        2022年8月11日
      • liunx常用命令

        查找文件:find   find .-name *.rpm 在當(dāng)前目錄中查找rpm包   find .|grep page 在當(dāng)前目錄及其子目錄中查找文件名包含page的文件   …

        2022年6月25日
      • 40 – 真正理解 Bind、Call 和 Apply

        原文地址:https://dev.to/bhagatparwinder/truly-understand-bind-call-apply-21da Bind JavaScript …

        2022年6月21日
      • 華為P60 Pro+曝光,處理器大亮

        對(duì)于目前的華為來(lái)講Mate 50系列可能是大家最關(guān)注的對(duì)象,但誰(shuí)也沒(méi)有想到華為Mate 50系列發(fā)布日期還沒(méi)有確定,華為P60系列就曝光了。而且曝光的是華為P60 Pro+這款機(jī)型…

        2022年6月14日
      • linux centos 系統(tǒng)盤文件系統(tǒng)損壞-已解決

        當(dāng)我們使用的Linux虛擬機(jī)(云服務(wù)器/vps)磁盤出現(xiàn)xfs文件系統(tǒng)損壞時(shí),該如何進(jìn)行修復(fù)? xfs格式文件系統(tǒng)損壞,是運(yùn)維常見的一個(gè)場(chǎng)景,經(jīng)常發(fā)生在強(qiáng)制重啟、異常關(guān)機(jī)、軟件沖突…

        2022年8月11日
      • 華為團(tuán)隊(duì)《python開發(fā)實(shí)戰(zhàn)》高清PDF版開放下載

        華為,華為筆記本,華為系統(tǒng),華為鴻蒙系統(tǒng) 今天推薦一套華為團(tuán)隊(duì)內(nèi)部都在用的《python開發(fā)實(shí)戰(zhàn)》,進(jìn)入大廠不再是夢(mèng)! 資料目錄: 獲取方式:

        2022年7月11日

      聯(lián)系我們

      聯(lián)系郵箱:admin#wlmqw.com
      工作時(shí)間:周一至周五,10:30-18:30,節(jié)假日休息