手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

平滑升级OpenSSH版本方法

[日期:2015-08-20] 来源:Linux社区  作者:weihaoxuan [字体:大 中 小]

因为老版本的OpenSSH存在远程访问执行漏洞,因此安装了Linux系统后需要升级OpenSSH来修复此漏洞,加强服务器安全性。

注意:升级过程中不要重启sshd服务,否则会远程连接不上!!

升级版本为: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

在Ubuntu Server 13.10系统中安装配置OpenSSH http://www.linuxidc.com/Linux/2014-02/96953.htm

Ubuntu安装远程登录OpenSSH服务 http://www.linuxidc.com/Linux/2014-02/97218.htm

通过OpenSSH远程登录时的延迟问题解决 http://www.linuxidc.com/Linux/2013-07/86879.htm

Ubuntu 12.10下OpenSSH的离线安装方法 http://www.linuxidc.com/Linux/2013-04/82814.htm

OpenSSH升级步骤及注意事项详解 http://www.linuxidc.com/Linux/2013-04/82123.htm

OpenSSH普通用户无法登录的几种情况的解决方法 http://www.linuxidc.com/Linux/2012-05/59457.htm

通用线程: OpenSSH 密钥管理,第 1 部分理解 RSA/DSA 认证 http://www.linuxidc.com/Linux/2011-08/39871.htm

RedHat安装OpenSSH和配置sftp锁定目录 http://www.linuxidc.com/Linux/2012-12/75398.htm

OpenSSL 的详细介绍:请点这里
OpenSSL 的下载地址:请点这里

本文永久更新链接地址:http://www.linuxidc.com/Linux/2015-08/122003.htm

linux
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款