zlib下载地址:  http://www.zlib.net/
LibreSSL下载地址: https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/
OpenSSH下载地址: http://mirror.aarnet.edu.au/pub/OpenBSD/OpenSSH/portable/
rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm
rpm -ivh gmp-devel-4.3.1-7.el6_2.2.x86_64.rpm
rpm -ivh mpfr-devel-2.4.1-6.el6.x86_64.rpm

  

1、安装zlib

tar -xzvf zlib-1.2.11.tar.gz
cd zlib-1.2.11
./configure --prefix=/usr/local/zlib-1.2.11
make && make install

如果需要升级ntp的话,一定要再升级ssl前升级ntp,否则会报如下错误:

libsntp.a(crypto.o): In function `compute_mac':
/usr/local/ntp-4.2.8p13/sntp/crypto.c:79: undefined reference to `EVP_MD_CTX_new'
/usr/local/ntp-4.2.8p13/sntp/crypto.c:117: undefined reference to `EVP_MD_CTX_free'
collect2: ld returned 1 exit status
make[4]: *** [sntp] 错误 1
make[4]: Leaving directory `/usr/local/ntp-4.2.8p13/sntp'
make[3]: *** [all-recursive] 错误 1
make[3]: Leaving directory `/usr/local/ntp-4.2.8p13/sntp'
make[2]: *** [all] 错误 2
make[2]: Leaving directory `/usr/local/ntp-4.2.8p13/sntp'
make[1]: *** [all-recursive] 错误 1
make[1]: Leaving directory `/usr/local/ntp-4.2.8p13'
make: *** [all] 错误 2

  

2、安装libressl

千万不要删除旧版本的openssl,有可能导致yum无法正常使用。

cd libressl-3.0.2
./configure --prefix=/usr/local
make
make install

libressl代替openssl

vim /etc/ld.so.conf.d/local.conf  #新建local.conf文件,添加下面一行
/usr/local/lib # 将 /usr/local/lib 目录加入到模块加载目录。 ldconfig -v #重新加载共享模块:
openssl version #查看版本

安装openssh

#--with-ssl-dir  指定ssl的安装目录
#--with-zlib 指定zlib的安装目录
./configure --prefix=/usr/local/openssh-8.1p1 --sysconfdir=/etc/ssh --with-ssl-dir=/usr/local --with-zlib=/usr/local/zlib-1.2.11 --with-md5-passwords
make
make install cd /etc/init.d/
mv sshd sshd.bak
cd /usr/local/openssh-8.1p1/contrib/redhat/
cp -p sshd.init /etc/init.d/sshd
vi /etc/init.d/sshd
SSHD=/usr/local/openssh-8.1p1/sbin/sshd #25行 SSHD=/usr/sbin/sshd
/usr/local/openssh-8.1p1/bin/ssh-keygen -A #41行 /usr/bin/ssh-keygen -A
chkconfig --add sshd
chkconfig sshd on
chkconfig --list sshd
service sshd restart vim /etc/profile
export PATH=/usr/local/openssh-8.1p1/bin:$PATH

  

  

CentOS7(RedHat7)需要再做以下操作。

将systemctl下的原ssh相关文件移走,将不然升级后的openssh不兼容。

mv /usr/lib/systemd/system/ssh*  /opt

vi /etc/ssh/sshd_config   //增加下一行

PermitRootLogin yes

service sshd restart
vi /etc/profile 或者  ~/.bash_profile  设置PATH变量

export PATH=/usr/local/openssh-8.1p1/sbin:/usr/local/openssh-8.1p1/bin:$PATH

source /etc/profile

 验证:

ssh -V
openssl version

  

最新文章

  1. windows 下配置 nginx的问题
  2. centos 20T硬盘(超过16T)分区
  3. Linux内核启动logo
  4. Linux之格式化与挂载
  5. 第七篇 Integration Services:中级工作流管理
  6. 正则的小效果:-------> 过滤敏感词
  7. MySQL 绿色版安装方法图文教程
  8. 让iOS开发变得更有效率-分类、工具类
  9. 团队作业9--测试与发布(Beta版)
  10. Leetcode_203_Remove Linked List Elements
  11. 解决Configuration 'compile' is obsolete and has been replaced with implementation
  12. selenium chrome在新标签页打开链接的方法
  13. (90)Wangdao.com第二十三天_JavaScript CSS 操作
  14. c语言实现:三子棋
  15. CSS解决字母不换行
  16. CentOS6.5 上crontab每天自动备份mysql数据库
  17. pycharm中出现的错误
  18. DevExpress.Mvvm.Free
  19. (转)细说JDK动态代理的实现原理
  20. Python: json模块实例详解

热门文章

  1. SDUT-2124_基于邻接矩阵的广度优先搜索遍历
  2. Effective C++: 04设计与声明
  3. 《mysql必知必会》笔记3(插入、更新、删除、创建删除更新表、视图)
  4. iOS Animation 主流炫酷动画框架(特效)收集整理 #91
  5. CF1054F Electric Scheme
  6. Android教程 -09 数据的持久化存储
  7. H3C 帧中继基本概念
  8. iptables一个包过滤防火墙实例
  9. 谷歌浏览器中kindeditor编译器字体不能为微软雅黑的问题?
  10. python模块之configparser模块