Ubuntu 24.04升级openssh9.8p1
- 1、更新
- 2、安装依赖
- 3、新建文件夹
- 4、进入新建文件夹
- 5、下载openssh9.8p1安装包
- 6、当前文件夹解压
- 7、进入解压文件夹
- 8、配置
- 9、编译及安装
- 10、重启ssh
- 11、查看ssh及sshd的运行状态
1、更新
            
            
              powershell
              
              
            
          
          apt update2、安装依赖
            
            
              powershell
              
              
            
          
          apt-get install build-essential zlib1g-dev libssl-dev libpam0g-dev3、新建文件夹
            
            
              powershell
              
              
            
          
          mkdir /usr/local/ssh4、进入新建文件夹
            
            
              powershell
              
              
            
          
          cd /usr/local/ssh5、下载openssh9.8p1安装包
            
            
              powershell
              
              
            
          
          wget https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.8p1.tar.gz6、当前文件夹解压
            
            
              powershell
              
              
            
          
          tar zxvf openssh-9.8p1.tar.gz7、进入解压文件夹
            
            
              powershell
              
              
            
          
          cd  openssh-9.8p18、配置
            
            
              powershell
              
              
            
          
          ./configure --without-openssl-header-check
注:如果配置过程报"configure: error: *** zlib.h missing - please install first or check config.log ***"之类的错误,安装
sudo apt-get update  
sudo apt-get install zlib1g-dev
注:如果配置过程报"configure: error: *** working libcrypto not found, check config.log"
sudo apt-get update  
sudo apt-get install libssl-dev9、编译及安装
            
            
              powershell
              
              
            
          
          make && make install10、重启ssh
            
            
              powershell
              
              
            
          
          systemctl  restart ssh11、查看ssh及sshd的运行状态
            
            
              powershell
              
              
            
          
          systemctl status ssh  
systemctl status sshd
ssh -V
sshd -V