openssh安装/更新教程(CentOS)

由于rpm包版本总落后于tar包,对于想安装新版本或由于漏洞需要更新到新版本那只能选择源代方式编译安装。

更新执行和安装一样的步骤就行了。

 

1.下载

官方网址:http://www.openssh.com/

在页面左侧选择操作系统进入,Linux对应页面为:http://www.openssh.com/portable.html

选择一个镜像站点进入下载,比如:https://mirrors.evowise.com/pub/OpenBSD/OpenSSH/portable/

拉到页面最底部,选择最新版本的openssh下载,如openssh-7.4p1.tar.gz

安装说明:http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/INSTALL

 

2.安装

tar -zxf  openssh-7.4p1.tar.gz   #如果提示非tar文件,可在windows下先解压成.tar文件
cd openssh-7.4p1
./configure                      #检测环境是否满足
make                             #编译
make install                     #安装
service sshd restart #重启,似乎不重启也升级好

 

3.可能出现的问题

1)configure: error: no acceptable C compiler found in $PATH

yum install -y gcc

2)configure: error: *** zlib.h missing – please install first or check config.log

 yum install -y zlib-devel

3)configure: error: *** OpenSSL headers missing – please install first or check config.log

yum install -y openssl-devel

 

posted on 2017-03-09 14:21  诸子流  阅读(4128)  评论(0编辑  收藏  举报