前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >CentOS 6.4下OpenSSH升级到6.7操作过程详解

CentOS 6.4下OpenSSH升级到6.7操作过程详解

作者头像
星哥玩云
发布2022-07-04 13:10:00
8680
发布2022-07-04 13:10:00
举报
文章被收录于专栏:开源部署

一、环境描述

1)操作系统:CentOS 6.4 64位

2)Openssl版本:1.0.1e-15.el6,由于升级到openssh_6.7p1,需要OpenSSL的版本在0.9.8f以上,所以这里就不用升级openssl了。直接升级openssh就行了。

3)Openssh升级前版本:openssh-5.3p1-94.el6;Openssh升级后版本:openssh_6.7p1(源码安装)

4)连接工具xshell 4。要预防超时断开连接。

二、升级sshd到OpenSSH-6.7并删除老版本ssh

1)升级前准备

下载openssh-6.7p1.tar.gz

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

备份ssh配置文件 :

# mv /etc/ssh /etc/ssh.bak

查看是否缺包

# rpm -qa | egrep "gcc|make|perl|pam|pam-devel|zlib|zlib-devel"

如果有配置yum了的话可以直接yum安装这些包,这样既可以检验是否装了,没装的直接装上。

yum -y install gcc* make perl pam pam-devel zlib zlib-devel

先卸载完旧版本的openssh

# rpm -e `rpm -qa | grep openssh`

2)编译安装新版本openssh

# tar zxf openssh-6.7p1.tar.gz && cd openssh-6.7p1

如果需要伪装ssh显示的版本信息,先修改version.h文件:

# ./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam --with-zlib --with-md5-passwords

# make

# make install

3)查看是否升级到新版本

4)复制启动脚本到/etc/init.d

# cp /root/openssh-6.7p1/contrib/RedHat/sshd.init /etc/init.d/sshd

加入开机自启

# chkconfig --add sshd

5)启动sshd,用start或reload。不要restart,restart 会直接断开连接,而并不会接着启动sshd服务,这时候要通过其他途径进入机器,然后启动sshd服务才行。

如果xshell4连接不上,修改配置,使xshell4默认支持

OpenSSH平滑升级到6.7操作步骤  http://www.linuxidc.com/Linux/2014-12/110466.htm

通过OpenSSL提供FTP+SSL/TLS认证功能,并实现安全数据传输 http://www.linuxidc.com/Linux/2013-05/84986.htm

加密算法浅析及OpenSSL,OpenSSH使用 http://www.linuxidc.com/Linux/2014-08/105386.htm

在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

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档