linux openssh升级7.4,CentOS 6.5上升级openssh7.4

本文档详细记录了在CentOS6.5系统中升级OpenSSH到7.4p1的过程,包括先安装依赖zlib和openssl,再安装openssl-fips和openssl-1.0.2i,最后解决配置错误并成功安装OpenSSH-7.4p1,确保PAM和TCP-Wrappers的支持。
摘要由CSDN通过智能技术生成

Linux  升级openssh7.4

环境:CentOS 6.5

提前开telnet 服务

准备安装包

第一步:

解压:zlib-1.2.8.tar.gz

[root@dbaul01 openssh]# tar -xvf zlib-1.2.8.tar.gz

[root@dbaul01 openssh]# cd zlib-1.2.8

[root@dbaul01 zlib-1.2.8]# ./configure

5b6f755d92d8bcb5aec35278c67de7e8.png

[root@dbaul01 zlib-1.2.8]# make

184b7b76cb8a05016d38be76a3468e6b.png

[root@dbaul01 zlib-1.2.8]# make install

730a2b5693ec7028117141b0a62b9968.png

查看

[root@dbaul01 zlib-1.2.8]# ll /usr/local/lib

c449186bfe7283b2e3fdbac88e1f8303.png

第二步:

查看目前的openssl版本

[root@dbaul01 openssh]# openssl version

先安装一个openssl-fips

[root@bogon openssh]# tar -xvf openssl-fips-2.0.12.tar.gz

[root@bogon openssl-fips-2.0.12]# ./config

[root@bogon openssl-fips-2.0.12]# make

[root@bogon openssl-fips-2.0.12]# make install

安装openssl-fips 完毕

第三步:

安装openssl-1.0.2i

[root@bogon openssl-1.0.2i]# ./config

[root@bogon openssl-1.0.2i]# make

[root@bogon openssl-1.0.2i]# make install

[root@bogon openssl-1.0.2i]# cd /usr/local/ssl/

[root@bogon ssl]# cd bin/

[root@bogon bin]# ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl

[root@bogon bin]# openssl version -a

ac63aee9ffe3f71355510e4db6880314.png

第四步:

安装openssh-7.4p1

[root@dbaul01 openssh-7.4p1]#  ./configure --prefix=/usr                     \

--sysconfdir=/etc/ssh             \

--with-md5-passwords              \

--with-privsep-path=/var/lib/sshd

检查出现error

configure: error: PAM headers not found

3f3fec5ab3841638e33eca79a1fa26a2.png

缺失 PAM-header

安装 PAM-header

[root@dbaul01 openssh]# yum install pam-devel.x86_64 -y

再次编译

[root@dbaul01 openssh-7.4p1]# ./configure   --prefix=/usr   --sysconfdir=/etc/ssh   --with-md5-passwords   --with-pam   --with-tcp-wrappers   --with-ssl-dir=/usr/local/ssl   --without-hardening

18f15117a301f210aec883614242caf0.png

编译成功

[root@dbaul01 openssh-7.4p1]# make

[root@dbaul01 openssh-7.4p1]# make install

[root@localhost redhat]# pwd

/root/openssh/openssh-7.4p1/contrib/redhat

[root@localhost redhat]# mv /etc/init.d/sshd /etc/init.d/sshd20161222

[root@localhost redhat]# cp sshd.init /etc/init.d/sshd

[root@localhost redhat]# chmod u+x /etc/init.d/sshd

[root@localhost redhat]# chkconfig --add sshd

[root@localhost openssh-7.4p1]# cp ssh_config /etc/ssh/ssh_config

cp: overwrite `/etc/ssh/ssh_config'? y

[root@localhost openssh-7.4p1]# cp -p sshd_config /etc/ssh/sshd_config

cp: overwrite `/etc/ssh/sshd_config'? y

[root@localhost openssh-7.4p1]#

[root@localhost openssh-7.4p1]# ssh -V

OpenSSH_7.4p1, OpenSSL 1.0.2i  22 Sep 2016

安装完毕

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值