Linux系统下怎么升级OpenSSH

2025-05-16 10:57:24
推荐回答(2个)
回答(1):

升级版本为:openssh-6.6p1 举个例子,可以参考
  升级方法:
  1、加载本地源(方法不描述了)
  2、执行下列命令
  yum install bash -y
  yum install -y zlib zlib-devel openssl openssl-devel
  tar -zxvf openssh-6.6p1.tar.gz -C /usr/local/src/
  cd /usr/local/src/openssh-6.6p1/
  cp /etc/init.d/sshd /etc/init.d/sshd.old
  tar -cvf ssh.bak.tar /etc/ssh
  yum install gcc -y
  3、卸载老版本
  rpm -qa|grep ssh
  rpm -e openssh-server-5.3p1-81.el6.x86_64
  rpm -e openssh-clients-5.3p1-81.el6.x86_64 --nodeps
  rpm -qa|grep ssh
  rpm -e openssh-askpass-5.3p1-81.el6.x86_64
  rpm -e openssh-5.3p1-81.el6.x86_64
  rpm -qa|grep ssh
  4、开始升级
  。/configure --prefix=/usr --sysconfdir=/etc/ssh --with-zlib --with-md5-passwords
  make && make install
  mv /etc/init.d/sshd.old /etc/init.d/sshd
  mkdir -p /var/empty/sshd/etc
  /etc/init.d/sshd restart
  chkconfig --add sshd
  chkconfig sshd on
  chkconfig --list|grep sshd
  5、查看是否升级成功
  ssh -V
  OpenSSH_6.6p1, OpenSSL 1.0.0-fips 29 Mar 2010
  以上就是Linux系统下怎么升级OpenSSH的介绍了,升级成功了旧版本的一些问题和故障自然就能得到修复了。

回答(2):

命令 作用
yum repolist all 列出所有仓库。
yum list all 列出仓库中所有软件包
yum info 软件包名称 查看软件包信息
yum install 软件包名称 安装软件包
yum reinstall 软件包名称 重新安装软件包
yum update 软件包名称 升级软件包
yum remove 软件包 移除软件包
yum clean all 清除所有仓库缓存
yum check-update 检查可更新的软件包
yum grouplist 查看系统中已经安装的软件包组
yum groupinstall 软件包组 安装指定的软件包组
yum groupremove软件包组 移除指定的软件包组
yum groupinfo 软件包组 查询指定的软件包组信息
请参考《linux就该这么学》,第1章 部署虚拟环境安装linux系统,查看软件升级命令。