升级openssl和openssh

鉴于openssl 1.0.1的安全漏洞, 如今都升级1.0.1g版本的openssl了, 这里记录下升级流程.html

0. 先查看当前安装的版本shell

   ssh -V 查看ssh版本安全

   openssl version -a 查看openssl版本服务器

1. 首先到官网下载新版的源码包ssh

     openssh: http://www.openssh.com/portable.html 这里, 官网上找到的下载有两种, 一种是直接下载OpenBSD的(附带openssh, 显然不是我等须要的), 另一种就是这种portable版的测试

     openssl:  http://www.openssl.org/source/htm

2. 先安装openssl, 必定记得加上--shared选项, 不然openssh编译的时候会找不到新安装的openssl的library, 会报错: openssl的 header和library版本不匹配md5

    ./config --prefix=/usr --shared
    make
    make test
    make installssl

    完毕后查看openssl版本安装是否正确源码

3. 安装openssh

    ./configure --prefix=/usr --with-pam --with-zlib --with-md5-passwords
     make
     make install

     这种安装会把sshd的配置文件放在/usr/etc/sshd_config

     须要重启sshd服务而且从新登陆shell, 才能查看openssh是否已经安装新版本, 建议先保留安装openssh的这个shell, 另开一个shell测试, 防止设置错误致使服务器没法链接

相关文章
相关标签/搜索