CentOS7 升级 openssh 到 openssh-8.0p1版本

centos7.3和centos7.6升级完毕测试登录ssh以及重启后登录ssh均无问题。

前期请自行配置好yum源(如果不会请百度)

整个过程不需要卸载原先的openssl包和openssh的rpm包。不影响我们的操作

本文的环境都是系统自带的openssh,没有经历过手动编译安装方式。如果之前有手动编译安装过openssh,请参照本文自行测试是否能成功。

如果严格参照本文操作,我保证你升级没问题

centos7.6升级后的效果


1

2

3

4

5

6

7

8

[[email protected] ~]# ssh -V

OpenSSH_8.0p1, OpenSSL 1.0.2r  26 Feb 2019

[[email protected] ~]# openssl version

OpenSSL 1.0.2r  26 Feb 2019

[[email protected] ~]# cat /etc/redhat-release

CentOS Linux release 7.6.1810 (Core)

[[email protected] ~]#

  

centos7.3升级后的效果


1

2

3

4

5

6

7

[[email protected] ~]# openssl version

OpenSSL 1.0.2r  26 Feb 2019

[[email protected] ~]# ssh -V

OpenSSH_8.0p1, OpenSSL 1.0.2r  26 Feb 2019

[[email protected] ~]# cat /etc/redhat-release

CentOS Linux release 7.3.1611 (Core)

[[email protected] ~]#

  

如果ssh版本过低,最好先yum update openssh升级下到目前yum仓库默认的openssh7.4p1版本

默认centos7.3的ssh是如下版本


1

2

3

4

5

[[email protected] ~]# cat /etc/redhat-release

CentOS Linux release 7.3.1611 (Core)

[[email protected] ~]# ssh -V

OpenSSH_6.6.1p1, OpenSSL 1.0.1e-fips 11 Feb 2013

[[email protected] ~]#

  

执行yum update  openssh先升级下(反正官方提供的这种升级是没问题的。如果之前手动编译操作过openssh的升级,变更了默认配置文件路径什么的请自行测试。)

(这里准备统一openssh版本为7.4p1之后再统一编译安装升级到openssh8.0p1)


1

2

3

4

5

[[email protected] ~]# yum update openssh -y

[[email protected] ~]# ssh -V

OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017

[[email protected] ~]#

 

安装telnet-server以及xinetd


1

2

3

4

5

6

7

8

9

10

11

[[email protected] ~]# yum install xinetd telnet-server -y

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

 * base: mirrors.163.com

 * epel: mirrors.aliyun.com

 * extras: mirrors.cn99.com

 * updates: mirrors.cn99.com

Package 2:xinetd-2.3.15-13.el7.x86_64 already installed and latest version

Package 1:telnet-server-0.17-64.el7.x86_64 already installed and latest version

Nothing to do

[[email protected] ~]#

  

配置telnet



现在很多centos7版本安装telnet-server以及xinetd之后没有一个叫telnet的配置文件了。

如果下面telnet文件不存在的话,可以跳过这部分的更改


1

2

[[email protected] ~]# ll /etc/xinetd.d/telnet

ls: cannot access /etc/xinetd.d/telnet: No such file or directory

  

如果下面文件存在,请更改配置telnet可以root登录,把disable = yes改成disable = no


1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

[[email protected] yum.repos.d]# cat /etc/xinetd.d/telnet

# default: on

# description: The telnet server serves telnet sessions; it uses \

#   unencrypted username/password pairs for authentication.

service telnet

{

    disable = no

    flags       = REUSE

    socket_type = stream       

    wait        = no

    user        = root

    server      = /usr/sbin/in.telnetd

    log_on_failure  += USERID

}

[[email protected] yum.repos.d]# vim /etc/xinetd.d/telnet

[[email protected] yum.repos.d]# cat /etc/xinetd.d/telnet

# default: on

# description: The telnet server serves telnet sessions; it uses \

#   unencrypted username/password pairs for authentication.

service telnet

{

    disable = yes

    flags       = REUSE

    socket_type = stream       

    wait        = no

    user        = root

    server      = /usr/sbin/in.telnetd

    log_on_failure  += USERID

}

  

配置telnet登录的终端类型,在/etc/securetty文件末尾增加一些pts终端,如下


1

2

3

4

pts/0

pts/1

pts/2

pts/3

配置之后的显示


1

2

3

4

5

6

7

8

[[email protected] ~]# vim /etc/securetty

[[email protected] ~]# tail -5 /etc/securetty

xvc0

pts/0

pts/1

pts/2

pts/3

[[email protected] ~]#

  

启动telnet服务,并设置开机自动启动


1

2

3

4

5

6

7

8

9

10

11

[[email protected] ~]# systemctl enable xinetd

 

[[email protected] ~]# systemctl enable telnet.socket

Created symlink from /etc/systemd/system/sockets.target.wants/telnet.socket to /usr/lib/systemd/system/telnet.socket.

[[email protected] ~]#

[[email protected] ~]# systemctl start telnet.socket

[[email protected] ~]# systemctl start xinetd

[[email protected] ~]# netstat -lntp|grep 23

tcp6       0      0 :::23                   :::*                    LISTEN      1/systemd

[[email protected] ~]#

  

切换到telnet方式登录,以后的操作都在telnet终端下操作,防止ssh连接意外中断造成升级失败

telnet方式登录

 安装依赖包



升级需要几个组件,有些是和编译相关的等


1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

[[email protected] ~]# yum install  -y gcc gcc-c++ glibc make autoconf openssl openssl-devel pcre-devel  pam-devel

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

 * base: mirrors.163.com

 * epel: mirrors.aliyun.com

 * extras: mirrors.cn99.com

 * updates: mirrors.cn99.com

Package gcc-4.8.5-36.el7_6.1.x86_64 already installed and latest version

Package gcc-c++-4.8.5-36.el7_6.1.x86_64 already installed and latest version

Package glibc-2.17-260.el7_6.4.x86_64 already installed and latest version

Package 1:make-3.82-23.el7.x86_64 already installed and latest version

Package autoconf-2.69-11.el7.noarch already installed and latest version

Package 1:openssl-1.0.2k-16.el7_6.1.x86_64 already installed and latest version

Package 1:openssl-devel-1.0.2k-16.el7_6.1.x86_64 already installed and latest version

Package pcre-devel-8.32-17.el7.x86_64 already installed and latest version

Package pam-devel-1.1.8-22.el7.x86_64 already installed and latest version

Nothing to do

[[email protected] ~]#

  

安装pam和zlib等(后面的升级操作可能没用到pam,安装上也没啥影响,如果不想安装pam请自行测试)


1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

[[email protected] ~]# yum install  -y pam* zlib*

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

 * base: mirrors.163.com

 * epel: mirrors.aliyun.com

 * extras: mirrors.cn99.com

 * updates: mirrors.cn99.com

Package pam_yubico-2.26-1.el7.x86_64 already installed and latest version

Package pam_script-1.1.8-1.el7.x86_64 already installed and latest version

Package pam_oath-2.4.1-9.el7.x86_64 already installed and latest version

Package pam_snapper-0.2.8-4.el7.x86_64 already installed and latest version

Package pam_ssh_agent_auth-0.10.3-2.16.el7.x86_64 already installed and latest version

Package pam_2fa-1.0-1.el7.x86_64 already installed and latest version

Package pam_mapi-0.3.4-1.el7.x86_64 already installed and latest version

Package pam_ssh_user_auth-1.0-1.el7.x86_64 already installed and latest version

Package pam_mount-2.16-5.el7.x86_64 already installed and latest version

Package pam_radius-1.4.0-3.el7.x86_64 already installed and latest version

Package pamtester-0.1.2-4.el7.x86_64 already installed and latest version

Package pam_afs_session-2.6-5.el7.x86_64 already installed and latest version

Package pam_pkcs11-0.6.2-30.el7.x86_64 already installed and latest version

Package pam-1.1.8-22.el7.x86_64 already installed and latest version

Package pam_ssh-2.3-1.el7.x86_64 already installed and latest version

Package 1:pam_url-0.3.3-4.el7.x86_64 already installed and latest version

Package pam_wrapper-1.0.7-2.el7.x86_64 already installed and latest version

Package pam-kwallet-5.5.2-1.el7.x86_64 already installed and latest version

Package pam-devel-1.1.8-22.el7.x86_64 already installed and latest version

Package pam_krb5-2.4.8-6.el7.x86_64 already installed and latest version

Package zlib-devel-1.2.7-18.el7.x86_64 already installed and latest version

Package zlib-static-1.2.7-18.el7.x86_64 already installed and latest version

Package zlib-1.2.7-18.el7.x86_64 already installed and latest version

Package zlib-ada-1.4-0.5.20120830CVS.el7.x86_64 already installed and latest version

Package zlib-ada-devel-1.4-0.5.20120830CVS.el7.x86_64 already installed and latest version

Nothing to do

[[email protected] ~]#

  

下载openssh包和openssl的包



我们都下载最新版本,下载箭头指的包

https://openbsd.hk/pub/OpenBSD/OpenSSH/portable/

https://ftp.openssl.org/source/

 开始安装openssl


1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

[[email protected] ~]# mkdir /data/tools -p

[[email protected] ~]# cd /data/tools/

[[email protected] /data/tools]# rz -E

rz waiting to receive.

[[email protected] /data/tools]# ll

total 5224

-rw-r--r-- 1 root root 5348369 Apr 27 12:19 openssl-1.0.2r.tar.gz

解压文件

[[email protected] /data/tools]# tar xfz openssl-1.0.2r.tar.gz

[[email protected] /data/tools]# ll

total 5228

drwxr-xr-x 20 root root    4096 Apr 27 12:20 openssl-1.0.2r

-rw-r--r--  1 root root 5348369 Apr 27 12:19 openssl-1.0.2r.tar.gz

[[email protected] /data/tools]# cd

[[email protected] ~]#

现在是系统默认的版本,等会升级完毕对比下

[[email protected] ~]# openssl version

OpenSSL 1.0.2k-fips  26 Jan 2017

[[email protected] ~]#

  

  

备份下面2个文件或目录(如果存在的话就执行)


1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

[[email protected] ~]# ll /usr/bin/openssl

-rwxr-xr-x 1 root root 555248 Mar 12 18:12 /usr/bin/openssl

[[email protected] ~]# mv /usr/bin/openssl /usr/bin/openssl_bak

[[email protected] ~]# ll /usr/include/openssl

total 1864

-rw-r--r-- 1 root root   6146 Mar 12 18:12 aes.h

-rw-r--r-- 1 root root  63204 Mar 12 18:12 asn1.h

-rw-r--r-- 1 root root  24435 Mar 12 18:12 asn1_mac.h

-rw-r--r-- 1 root root  34475 Mar 12 18:12 asn1t.h

-rw-r--r-- 1 root root  38742 Mar 12 18:12 bio.h

-rw-r--r-- 1 root root   5351 Mar 12 18:12 blowfish.h

......

[[email protected] ~]# mv /usr/include/openssl /usr/include/openssl_bak

[[email protected] ~]#

  

  

编译安装新版本的openssl

配置、编译、安装3个命令一起执行

&&符号表示前面的执行成功才会执行后面的


1

2

3

[[email protected] ~]# cd /data/tools/openssl-1.0.2r/

[[email protected] /data/tools/openssl-1.0.2r]# ./config shared && make && make install

  

以上命令执行完毕,echo $?查看下最后的make install是否有报错,0表示没有问题

下面2个文件或者目录做软链接 (刚才前面的步骤mv备份过原来的)


1

2

3

4

5

6

7

[[email protected] ~]# ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl

[[email protected] ~]# ln -s /usr/local/ssl/include/openssl /usr/include/openssl

[[email protected] ~]# ll /usr/bin/openssl

lrwxrwxrwx 1 root root 26 Apr 27 12:31 /usr/bin/openssl -> /usr/local/ssl/bin/openssl

[[email protected] ~]# ll /usr/include/openssl -ld

lrwxrwxrwx 1 root root 30 Apr 27 12:31 /usr/include/openssl -> /usr/local/ssl/include/openssl

[[email protected] ~]#

  

命令行执行下面2个命令加载新配置


1

2

3

echo "/usr/local/ssl/lib" >> /etc/ld.so.conf

/sbin/ldconfig

  

查看确认版本。没问题


1

2

[[email protected] ~]# openssl version

OpenSSL 1.0.2r  26 Feb 2019

  

 安装openssh 



上传openssh的tar包并解压


1

2

3

4

5

6

7

8

9

10

11

12

13

[[email protected] ~]# cd /data/tools/

[[email protected] tools]# ll

total 7628

-rw-r--r--  1 root root 1597697 Apr 18 07:02 openssh-8.0p1.tar.gz

drwxr-xr-x 20 root root    4096 Apr 23 23:12 openssl-1.0.2r

-rw-r--r--  1 root root 5348369 Feb 26 22:34 openssl-1.0.2r.tar.gz

-rwxr-xr-x  1 root root  853040 Apr 11  2018 sshd

[[email protected] tools]# tar xfz openssh-8.0p1.tar.gz

[[email protected] tools]# cd openssh-8.0p1

可能文件默认显示uid和gid数组都是1000,这里重新授权下。不授权可能也不影响安装(请自行测试)

[[email protected] tools]# chown -R root.root /data/tools/openssh-8.0p1

  

  

命令行删除原先ssh的配置文件和目录

然后配置、编译、安装

注意下面编译安装的命令是一行,请把第一行末尾的 \ 去掉,然后在文本里弄成一行之后放命令行执行


1

2

3

4

rm -rf /etc/ssh/*

./configure --prefix=/usr/ --sysconfdir=/etc/ssh  --with-openssl-includes=/usr/local/ssl/include \

 --with-ssl-dir=/usr/local/ssl   --with-zlib   --with-md5-passwords   --with-pam  && make && make install

  

参考下我的截图

安装完毕 检查下结果

修改配置文件最终为如下内容,其他的不要动


1

2

3

4

5

[[email protected] ~]# grep "^PermitRootLogin"  /etc/ssh/sshd_config

PermitRootLogin yes

[[email protected] ~]# grep  "UseDNS"  /etc/ssh/sshd_config

UseDNS no

[[email protected] ~]#

  

从原先的解压的包中拷贝一些文件到目标位置(如果目标目录存在就覆盖)

(可能下面的ssh.pam文件都没用到,因为sshd_config配置文件貌似没使用它,请自行测试。我这边是拷贝了)


1

2

3

4

5

6

7

[[email protected] /data/tools/openssh-8.0p1]# cp -a contrib/redhat/sshd.init /etc/init.d/sshd

[[email protected] /data/tools/openssh-8.0p1]# cp -a contrib/redhat/sshd.pam /etc/pam.d/sshd.pam

[[email protected] /data/tools/openssh-8.0p1]# chmod +x /etc/init.d/sshd

[[email protected] /data/tools/openssh-8.0p1]# chkconfig --add sshd

[[email protected] /data/tools/openssh-8.0p1]# systemctl enable sshd

[[email protected] /data/tools/openssh-8.0p1]#

  

 把原先的systemd管理的sshd文件删除或者移走或者删除,不移走的话影响我们重启sshd服务


1

2

[[email protected] ~]# mv  /usr/lib/systemd/system/sshd.service  /data1

[[email protected] ~]# mv  /usr/lib/systemd/system/sshd.socket  /data2

  

设置sshd服务开机启动


1

2

3

[[email protected] ~]# chkconfig sshd on

Note: Forwarding request to ‘systemctl enable sshd.socket‘.

Created symlink from /etc/systemd/system/sockets.target.wants/sshd.socket to /usr/lib/systemd/system/sshd.socket.

  

接下来测试启停服务。都正常


1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

以后管理sshd通过下面方式了

[[email protected] ~]# /etc/init.d/sshd restart

Restarting sshd (via systemctl):                           [  OK  ]

[[email protected] ~]#

[[email protected] ~]#

[[email protected] ~]# netstat -lntp

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   

tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      31800/sshd

tcp6       0      0 :::22                   :::*                    LISTEN      31800/sshd

tcp6       0      0 :::23                   :::*                    LISTEN      1/systemd

[[email protected] ~]# /etc/init.d/sshd stop

Stopping sshd (via systemctl):                             [  OK  ]

[[email protected] ~]# netstat -lntp

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   

tcp6       0      0 :::23                   :::*                    LISTEN      1/systemd

[[email protected] ~]# /etc/init.d/sshd start

Starting sshd (via systemctl):                            [  OK  ]

[[email protected] ~]#

[[email protected] ~]#

  

使用systemd方式也行


1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

[[email protected] ~]# systemctl stop sshd

[[email protected] ~]# netstat -lntp

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   

tcp6       0      0 :::23                   :::*                    LISTEN      1/systemd

[[email protected] ~]# systemctl start sshd

[[email protected] ~]# netstat -lntp

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   

tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      31958/sshd

tcp6       0      0 :::22                   :::*                    LISTEN      31958/sshd

tcp6       0      0 :::23                   :::*                    LISTEN      1/systemd

[[email protected] ~]# systemctl restart sshd

[[email protected] ~]# netstat -lntp

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   

tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      31999/sshd

tcp6       0      0 :::22                   :::*                    LISTEN      31999/sshd

tcp6       0      0 :::23                   :::*                    LISTEN      1/systemd

[[email protected] ~]#

  

测试版本。都正常


1

2

3

4

5

6

7

8

9

[[email protected] ~]# ssh -V

OpenSSH_8.0p1, OpenSSL 1.0.2r  26 Feb 2019

[[email protected] ~]#

[[email protected] ~]# telnet 127.0.0.1 22

Trying 127.0.0.1...

Connected to 127.0.0.1.

Escape character is ‘^]‘.

SSH-2.0-OpenSSH_8.0

  

如果不是生产机器。可以试着重启机器测试下登录sshd是否正常。我这边测试都没问题

测试没问题后可以把telnet服务关闭了


1

2

3

4

5

6

[[email protected] ~]# systemctl disable xinetd.service

Removed symlink /etc/systemd/system/multi-user.target.wants/xinetd.service.

[[email protected] ~]# systemctl stop xinetd.service

[[email protected] ~]# systemctl disable telnet.socket

[[email protected] ~]# systemctl stop telnet.socket

[[email protected] ~]# netstat -lntp

注:转载请注明出处

本文转载至:https://www.cnblogs.com/nmap/p/10779658.html ,并对其中错误进行了更正。

原文地址:https://www.cnblogs.com/Bluesky-bk/p/11330316.html

时间: 2024-09-28 23:23:36

CentOS7 升级 openssh 到 openssh-8.0p1版本的相关文章

centos7升级openssl、openssh常见问题及解决方法(亲测过)

升级至openssl 1.1.1版本 升级至openssh 8.0版本 openssl version -a   当前查看版本 一.安装telnet (以防升级失败,连不上服务器,建议弄) #查看是否安装 rpm -qa | grep telnet rpm -qa | grep xinetd #若无安装,yum安装 yum -y install telnet* yum -y install xinetd #将服务开机自启(此处根据自身情况考虑) systemctl enable xinetd.s

CentOS下升级默认的OpenSSH(OpenSSH_5.3p1到OpenSSH_7.6p1)

近期对IDC机房服务器做了一次安全漏洞扫描,漏扫结果显示服务器的OpenSSH版本太低(CentOS6默认是OpenSSH_5.3p1),存在漏洞隐患,安全部门建议升级到OpenSSH_7.6p1.升级OpenSSH的操作并不复杂,但由于是线上环境,故需要谨慎操作.特别需要注意的是:如果是通过ssh远程连接服务器后进行的版本升级操作,万一升级失败了,则ssh就远程登录不上去了.当然,如果服务器安装了iDRAC远程管理卡就好说了,如果没有iDRAC远程管理卡,则需要提前开启telnet远程登录(允

redhat7.2升级openssl、openssh

因公司服务器被绿盟扫描出openssl.openssh漏洞,所以需要升级openssl.openssh 操作系统:Red Hat Enterprise Linux Server release 7.2 (Maipo) 软件升级版本:openssl-1.0.2k.tar.gz.openssh-7.4p1.tar.gz 升级出现问题,编译安装openssh后,不会自动生成sshd.service等systemctl启动服务的文件,故提前做了备份,但觉得应该有其他的方法可以解决,希望大家提供宝贵意见

RedHat 7编译升级OpenSSL、OpenSSH及NTP

上篇分享了RedHat 6.5编译安装升级OpenSSL.OpenSSH及NTP的博文,这篇来测试一下RedHat 7.2编译安装升级OpenSSL.OpenSSH及NTP,主要过程基本一致,不过openssh略有不同.上篇博文请见:RedHat 6编译升级OpenSSL.OpenSSH及NTP 一.系统环境 操作系统:RedHat 7.2 升级前软件版本: OpenSSL 1.0.1e-fips.OpenSSH_6.6.1p1.ntpd 4.2.6p5 源码包: openssl-1.0.2l.

基于CentOS7搭建mongodb(3.6.6版本)

基于CentOS7搭建mongodb(3.6.6版本) mongodb简介 Mongodb,分布式文档存储数据库,由C++语言编写,旨在为WEB应用提供可扩展的高性能数据存储解决方案.MongoDB是一个高性能,开源,无模式的文档型数据库,是当前NoSql数据库中比较热门的一种.它在许多场景下可用于替代传统的关系型数据库或键/值存储方式.Mongo使用C++开发.MongoDB是一个介于关系数据库和非关系数据库之间的产品,是非关系数据库当中功能最丰富,最像关系数据库的.他支持的数据结构非常松散,

centos7使用kubeadm安装kubernetes 1.11版本多主高可用

centos7使用kubeadm安装kubernetes 1.11版本多主高可用 [TOC] kubernetes介绍要学习一个新的东西,先了解它是什么,熟悉基本概念会有很大帮助.以下是我学习时看过的一篇核心概念介绍.http://dockone.io/article/932 搭建Kubernetes集群环境有以下3种方式: minikubeMinikube是一个工具,可以在本地快速运行一个单点的Kubernetes,尝试Kubernetes或日常开发的用户使用.不能用于生产环境.官方地址:ht

APMServ5.2.6 升级php5.2 到 5.3版本

APMServ5.2.6 升级php5.2 到 5.3版本 做了四个半月的项目推翻重来,这次选择了symfony2框架,但是symfony2 需要php5.3版本的支持,但是自己机器用的集成环境APMServ5.2.6 的php版本是php5.2.6,所以需要升级一下PHP版本:1.到 php下载地址下载PHP5.3的VC6版本的zip文件,我下载的是:php-5.3.5-Win32-VC6-x86.zip 2.先停掉自己的web服务器,php-5.3.5-Win32-VC6-x86.zip解压

CentOS7 升级 cmake

编译cmake文件时,报错:CMake 3.0.0 or higher is required. You are running version 2.8.12.2 很明显,这是 cmake 版本过低导致的,那么就需要升级 cmake 到更高的版本.下面是升级 cmake 的步骤: 卸载原有通过 yum 安装的 cmake:yum remove cmake 下载cmake安装包: wget https://github.com/Kitware/CMake/releases/download/v3.

centos7升级OpenSSH(源码编译升级)

升级前首先确定当前openssh.openssl.zlib的版本,查看版本操作如下: [[email protected] ~]# ssh -V OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017 [[email protected] ~]# rpm -q zlib zlib-1.2.7-17.el7.x86_64 由此可以看到当前openssh版本为:7.4p1,openssl版本为:1.02k-fips,zlib 版本为1.2.7. 到相应的官网下载