openssh6.8升级方案V2.0
更新时间:2023-10-31 17:16:01 阅读量: 综合文库 文档下载
openssh6.8升级参考指南(仅供参考,请自行测试)
务必开启telnet防止登不上
系统信息如下:
系统版本:Red Hat Enterprise Linux Server release 6.5 (Santiago) 64位
openssl和openssh版本OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010
1.升级所需要的安装包
不同的环境需要不同的安装包,此次安装需要安装包如下 GCC环境所需的安装包: ppl-0.10.2-11.el6.x86_64.rpm cloog-ppl-0.15.7-1.2.el6.x86_64.rpm mpfr-2.4.1-6.el6.x86_64.rpm cpp-4.4.7-4.el6.x86_64.rpm gcc-4.4.7-4.el6.x86_64.rpm 编译安装openssl和openssh所需的安装包 zlib-devel-1.2.3-29.el6.x86_64.rpm pam-devel-1.1.1-17.el6.x86_64.rpm OpenSSH 升级所需安装包: openssl-1.0.0s.tar.gz
openssh-6.8p1.tar.gz 2.升级相关步骤
2.1安装GCC环境所需的安装包和相关软件包
[root@localhost opt]# rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm [root@localhost opt]# rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm [root@localhost opt]# rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm [root@localhost opt]# rpm -ivh cpp-4.4.7-4.el6.x86_64.rpm [root@localhost opt]# rpm -ivh gcc-4.4.7-4.el6.x86_64.rpm [root@localhost opt]# rpm -ivh zlib-devel-1.2.3-29.el6.x86_64.rpm [root@localhost opt]# rpm -ivh pam-devel-1.1.1-17.el6.x86_64.rpm 2.2卸载系统自带的openssh,同时清除系统/etc/ssh目录
备份openssh的配置文件
[root@localhost opt]#cp -r /etc/ssh /etc/ssh_bak
[root@localhost opt]# cp/etc/init.d/sshd /etc/init.d/sshd_bak [root@localhost opt]#cp/usr/sbin/sshd /usr/sbin/sshd_bak
[root@localhost opt]# rpm -qa | grepopenssh openssh-5.3p1-94.el6.x86_64 openssh-clients-5.3p1-94.el6.x86_64 openssh-server-5.3p1-94.el6.x86_64 openssh-askpass-5.3p1-94.el6.x86_64 [root@localhost opt]# rpm -e openssh-server [root@localhost opt]# rpm -e openssh-askpass [root@localhost opt]# rpm -e openssh-clients --nodeps [root@localhost opt]# rpm -e openssh [root@localhost ~]# rm -rf /etc/ssh 2.3 安装openssl [root@localhost opt]# tar -zxvf openssl-1.0.0s.tar.gz [root@localhost opt]# cd openssl-1.0.0s
[root@localhost openssl-1.0.0s]# ./config --prefix=/usr/local/openssl&& make && make install 2.4安装openssh
[root@localhost openssl-1.0.0s]# cd /opt
[root@localhost opt]# tar -zxvf openssh-6.8p1.tar.gz
[root@localhost opt]# cd openssh-6.8p1
[root@localhost openssh-6.8p1]# ./configure --prefix=/usr/local/openssh
--sysconfdir=/etc/ssh --with-ssl-dir=/usr/local/openssl --with-zlib=/usr/local/zlib --with-md5-passwords --without-hardening && make && make install 2.5修改配置文件
[root@localhost openssh-6.8p1]# cpcontrib/redhat/sshd.init/etc/init.d/sshd [root@localhost openssh-6.8p1]# chmod +x /etc/init.d/sshd [root@localhost openssh-6.8p1]# vi /etc/init.d/sshd 修改对应指令的安装目录 =============================
25行 SSHD=/usr/sbin/sshd 为 SSHD=/usr/local/openssh/sbin/sshd 41行 /usr/bin/ssh-keygen -A 为 /usr/local/openssh/bin/ssh-keygen -A ============================= 保存退出
2.6加入系统服务
[root@localhost openssh-6.8p1]# chkconfig --add sshd [root@localhost openssh-6.8p1]# service sshdstart [root@localhost openssh-6.8p1]# service sshd restart
断开重连可以登录 Xshell:\\>ssh 192.168.138.128 Connecting to 192.168.138.128:22... Connection established.
To escape to local shell, press 'Ctrl+Alt+]'. Last login: Tue Nov 3 05:51:34 2015 from 192.168.138.1 [root@localhost ~]# 2.7查看升级后的系统版本 [root@localhost ~]# ssh -V
OpenSSH_6.8p1, OpenSSL 1.0.0s 11 Jun 2015
三:失败回退 3.1备份目录回退
[root@localhost ~]# service sshd stop Stopping sshd: [ OK ]
[root@localhost ~]# cd /etc [root@localhostetc]# rm -rfssh
[root@localhostetc]# cp -r /etc/ssh_bak /etc/ssh/ [root@localhostetc]# cd /etc/init.d [root@localhostinit.d]#rmsshd rm: remove regular file `sshd'? y
[root@localhostinit.d]# cp /etc/init.d/sshd_bak /etc/init.d/sshd [root@localhostinit.d]# cd /usr/sbin/ [root@localhostsbin]# rmsshd
[root@localhostsbin]#cp /usr/sbin/sshd_bak/usr/sbin/sshd、
3.2安装rpm包
[root@localhost opt]# rpm -ivh openssh-5.3p1-94.el6.x86_64.rpm openssh-clients-5.3p1-94.el6.x86_64.rpm openssh-askpass-5.3p1-94.el6.x86_64.rpm openssh-server-5.3p1-94.el6.x86_64.rpm
[root@localhost opt]# service sshd start Starting sshd: [ OK ]
[root@localhost ~]# ssh -V OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010
[root@localhost ~]# service sshd stop Stopping sshd: [ OK ]
[root@localhost ~]# cd /etc [root@localhostetc]# rm -rfssh
[root@localhostetc]# cp -r /etc/ssh_bak /etc/ssh/ [root@localhostetc]# cd /etc/init.d [root@localhostinit.d]#rmsshd rm: remove regular file `sshd'? y
[root@localhostinit.d]# cp /etc/init.d/sshd_bak /etc/init.d/sshd [root@localhostinit.d]# cd /usr/sbin/ [root@localhostsbin]# rmsshd
[root@localhostsbin]#cp /usr/sbin/sshd_bak/usr/sbin/sshd、
3.2安装rpm包
[root@localhost opt]# rpm -ivh openssh-5.3p1-94.el6.x86_64.rpm openssh-clients-5.3p1-94.el6.x86_64.rpm openssh-askpass-5.3p1-94.el6.x86_64.rpm openssh-server-5.3p1-94.el6.x86_64.rpm
[root@localhost opt]# service sshd start Starting sshd: [ OK ]
[root@localhost ~]# ssh -V OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010
正在阅读:
openssh6.8升级方案V2.010-31
2018年大学迎新活动策划书与2018年大班下学期工作计划汇编精品资料04-30
梅湖村劳动力资源调查分析报告01-02
第一部分 第4章 VMware vSphere 5.1 群集深入解析04-15
汽车配件销售合同范本2019.doc03-05
2019七一建党节活动总结,提高党员的责任感和使命感04-27
宝坻区幼儿园中二班半日活动计划08-26
初中毕业感言一句话02-10
- 人教新课标必修4 Unit2 Working the land名师导航
- 毕业生“校漂族”大行其道 - 0
- 江苏各市中考作文题出炉 - 0
- 暑期精品班 - 三角形 - 图文
- 情人节送什么礼物好??超强礼物已抵达
- 工程项目管理制度1
- 第四次业务学习 2016
- 会计要素与会计科目
- 欠发达地区小企业会计准则运用问题研究
- 一级锅炉水G4题库
- BBD双进双出筒式磨煤机安装使用说明书 SM-1
- 初一数学有理数教案
- 渝北区房地产评估市场调研报告
- iWebMall 数据字典
- 2018年小学入学教育工作计划
- 计量专业实务与案例分析 - 模拟题三 - 2013年版
- 启示录讲义
- 路基灰土改良(方案)
- 人行反洗钱岗位准入培训测试题集
- 2015电大《学前儿童发展心理学》期末试题及答案
- 升级方案
- openssh
- 6.8
- 2.0
- 《放慢脚步去长大》读后感
- 矿井通风在煤矿安全生产中的作用和地位
- 古代诗歌鉴赏专题复习说课稿:探析近四年高考诗歌鉴赏命题特点及考查重点(2)
- 恒大集团房地产有限公司员工手册 珍藏版
- 直流电位差计的原理和使用
- 人大、政协会议文件管理(数字会议系统)方案 - 图文
- 后纺车间岗位说明书
- 采煤操作规程
- 关注弱势群体生活保障问题
- 北师大版小学二年级下册数学《十年的变化》教学设计
- 福建省2018年高三毕业班质量检查测试理科综合试卷(word版)
- 忠孝两难全 - 从《琵琶记》的“三不从”看作者创作的矛盾心理结构 - 图文
- 得钰泉矿泉水简介
- 龙归中学初三物理总复习导学案(浮力1)
- 实验室使用安全测试题及答案解析1
- 填埋场可研 - 图文
- 高中高考英语知识汇总(真题+解析+教程+练习+答案)第05章连词与感叹词
- 医学实验室—测量不确定度的评定与表达
- 人音版初中八年级上册音乐教案 全册
- 《儿童哲学》2014版教学大纲(周桂勋)