CentOS 6.5上升级openssh7.4

Linux  升级openssh7.4

环境:CentOS 6.5

提前开telnet 服务


http://zlib.net/zlib-1.2.8.tar.gz

准备安装包

第一步:

解压: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

[root@dbaul01 zlib-1.2.8]# make

[root@dbaul01 zlib-1.2.8]# make install

查看

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


第二步:

查看目前的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


第四步:


安装openssh-7.4p1 

http://www.linuxfromscratch.org/blfs/view/svn/postlfs/openssh.html 

[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

缺失 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

编译成功


[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
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值