Welcome 微信登录

首页 / 操作系统 / Linux / 平滑升级OpenSSH版本方法

因为老版本的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 -y3、卸载老版本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 ssh4、开始升级./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 sshd5、查看是否升级成功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.htmUbuntu安装远程登录OpenSSH服务 http://www.linuxidc.com/Linux/2014-02/97218.htm通过OpenSSH远程登录时的延迟问题解决 http://www.linuxidc.com/Linux/2013-07/86879.htmUbuntu 12.10下OpenSSH的离线安装方法 http://www.linuxidc.com/Linux/2013-04/82814.htmOpenSSH升级步骤及注意事项详解 http://www.linuxidc.com/Linux/2013-04/82123.htmOpenSSH普通用户无法登录的几种情况的解决方法 http://www.linuxidc.com/Linux/2012-05/59457.htm通用线程: OpenSSH 密钥管理,第 1 部分理解 RSA/DSA 认证 http://www.linuxidc.com/Linux/2011-08/39871.htmRedHat安装OpenSSH和配置sftp锁定目录 http://www.linuxidc.com/Linux/2012-12/75398.htmOpenSSL 的详细介绍:请点这里
OpenSSL 的下载地址:请点这里本文永久更新链接地址