openssh升级7.2p1过程
2017-01-09 17:01
387 查看
一、升级和卸载均需要使用root用户来执行(哪怕是考文件),以免在安装的过程中,出现权限的问题。
在升级openssh之前,要先安装telnet server,以解决在卸载了openssh之后,登录不上服务器。
安装telnet server之前,需要依赖xinetd,所以在安装telnet server 将 xinetd这个包安装上。
rpm -ivh xinetd-2.3.14-38.el6.x86_64.rpm
rpm -ivh telnet-server-0.17-47.el6_3.1.x86_64.rpm
两个包安装好后,修改配置文件
vi /etc/xinetd.d/telnet
将里面的 disable=yes 修改成no
关闭防火墙
service iptables stop
service xinetd start
对本机器的telent 服务搭建进行测试,如果测试通过,再卸载openssh.
二、安装
升级需要几个组件
yum install -y gcc openssl-devel pam-develrpm-build
现在新版本,目前是openssh-7.3最新,但刚刚出来,为保险,我选用7.2版本
wgethttp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.3p1.tar.gz
wgethttp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.2p1.tar.gz
wget http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.1p1.tar.gz
wget https://www.openssl.org/source/openssl-1.0.2h.tar.gz
wget http://zlib.net/zlib-1.2.8.tar.gz
准备相关的包
openssh下载地址:http://mirror.internode.on.net/pub/OpenBSD/OpenSSH/portable/
openssl相关包下载:http://www.openssl.org/source/
pam相关包下载:http://pkgs.org/centos-6/centos-x86_64/
zlib包下载: http://zlib.net/
1、升级zlib
tar zxvf zlib-1.2.8.tar.gz
cd zlib-1.2.8
./configure
make && make install
2、更新pam的rpm包。
不然configureopenssh的时候会报错
yum install pam-1.1.1-13.el6.x86_64.rpmpam-devel-1.1.1-13.el6.x86_64.rpm
注意:以下安装时,请务必再开一个SSH窗口连接所需要升级的服务器,避免ssh升级失败后,无法连接服务器。 3、编译安装openssl
tar zxvfopenssl-1.0.2h.tar.gz
cdopenssl-1.0.2h
./config--prefix=/usr/ --openssldir=/usr/ shared
make&& make install
====以下6行不操作,有些文章说明要做这些操作,但是我升级的时候没有这个。
mv/usr/bin/openssl /usr/bin/openssl.OFF
mv/usr/include/openssl /usr/include/openssl.OFF
ln -s/usr/local/ssl/bin/openssl /usr/bin/openssl
ln -s/usr/local/ssl/include/openssl /usr/include/openssl
echo"/usr/local/ssl/lib" >> /etc/ld.so.conf
#ldconfig –v
查看openssl版本。opensslversion显示OpenSSL 1.0.2h 3 May 2016。
4、编译安装openssh
tar zxvf openssh-7.2p1.tar.gz
cd openssh-7.2p1
./configure --with-zlib --with-ssl-dir --with-pam --bindir=/usr/bin--sbindir=/usr/sbin --sysconfdir=/etc/ssh
如果提示configure:error: PAM headers not found,可能是第2步没执行,需要安装pam-devel。
make && make install
完成后查看ssh版本。ssh -V查看
[root@localhost software]# ssh -V
OpenSSH_7.2p1, OpenSSL 1.0.2h 3 May 2016
5、重启ssh服务。
ssh -V
service sshd restart
[root@testserver2 tmp]# service sshd restart
Stopping sshd: [ OK ]
Starting sshd: /etc/ssh/sshd_config line 81: Unsupported optionGSSAPIAuthentication
/etc/ssh/sshd_config line 83: Unsupported optionGSSAPICleanupCredentials [ OK ]
解决:
将/etc/ssh/sshd_config文件中以上行数内容注释下即可
Sed -i '/^GSSAPICleanupCredentials/s/GSSAPICleanupCredentialsyes/#GSSAPICleanupCredentials yes/' /etc/ssh/sshd_config
sed -i '/^GSSAPIAuthentication/s/GSSAPIAuthenticationyes/#GSSAPIAuthentication yes/' /etc/ssh/sshd_config
sed -i '/^GSSAPIAuthentication/s/GSSAPIAuthenticationno/#GSSAPIAuthentication no/' /etc/ssh/sshd_config
更新后ssh有如下提示,但不影响使用:
[root@testserver2 tmp]# ssh 10.111.32.51
/etc/ssh/ssh_config line 50: Unsupported option"gssapiauthentication"
解决:
可以注释/etc/ssh/ssh_config的gssapiauthentication内容
在升级openssh之前,要先安装telnet server,以解决在卸载了openssh之后,登录不上服务器。
安装telnet server之前,需要依赖xinetd,所以在安装telnet server 将 xinetd这个包安装上。
rpm -ivh xinetd-2.3.14-38.el6.x86_64.rpm
rpm -ivh telnet-server-0.17-47.el6_3.1.x86_64.rpm
两个包安装好后,修改配置文件
vi /etc/xinetd.d/telnet
将里面的 disable=yes 修改成no
关闭防火墙
service iptables stop
service xinetd start
对本机器的telent 服务搭建进行测试,如果测试通过,再卸载openssh.
二、安装
升级需要几个组件
yum install -y gcc openssl-devel pam-develrpm-build
现在新版本,目前是openssh-7.3最新,但刚刚出来,为保险,我选用7.2版本
wgethttp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.3p1.tar.gz
wgethttp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.2p1.tar.gz
wget http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.1p1.tar.gz
wget https://www.openssl.org/source/openssl-1.0.2h.tar.gz
wget http://zlib.net/zlib-1.2.8.tar.gz
准备相关的包
openssh下载地址:http://mirror.internode.on.net/pub/OpenBSD/OpenSSH/portable/
openssl相关包下载:http://www.openssl.org/source/
pam相关包下载:http://pkgs.org/centos-6/centos-x86_64/
zlib包下载: http://zlib.net/
1、升级zlib
tar zxvf zlib-1.2.8.tar.gz
cd zlib-1.2.8
./configure
make && make install
2、更新pam的rpm包。
不然configureopenssh的时候会报错
yum install pam-1.1.1-13.el6.x86_64.rpmpam-devel-1.1.1-13.el6.x86_64.rpm
注意:以下安装时,请务必再开一个SSH窗口连接所需要升级的服务器,避免ssh升级失败后,无法连接服务器。 3、编译安装openssl
tar zxvfopenssl-1.0.2h.tar.gz
cdopenssl-1.0.2h
./config--prefix=/usr/ --openssldir=/usr/ shared
make&& make install
====以下6行不操作,有些文章说明要做这些操作,但是我升级的时候没有这个。
mv/usr/bin/openssl /usr/bin/openssl.OFF
mv/usr/include/openssl /usr/include/openssl.OFF
ln -s/usr/local/ssl/bin/openssl /usr/bin/openssl
ln -s/usr/local/ssl/include/openssl /usr/include/openssl
echo"/usr/local/ssl/lib" >> /etc/ld.so.conf
#ldconfig –v
查看openssl版本。opensslversion显示OpenSSL 1.0.2h 3 May 2016。
4、编译安装openssh
tar zxvf openssh-7.2p1.tar.gz
cd openssh-7.2p1
./configure --with-zlib --with-ssl-dir --with-pam --bindir=/usr/bin--sbindir=/usr/sbin --sysconfdir=/etc/ssh
如果提示configure:error: PAM headers not found,可能是第2步没执行,需要安装pam-devel。
make && make install
完成后查看ssh版本。ssh -V查看
[root@localhost software]# ssh -V
OpenSSH_7.2p1, OpenSSL 1.0.2h 3 May 2016
5、重启ssh服务。
ssh -V
service sshd restart
[root@testserver2 tmp]# service sshd restart
Stopping sshd: [ OK ]
Starting sshd: /etc/ssh/sshd_config line 81: Unsupported optionGSSAPIAuthentication
/etc/ssh/sshd_config line 83: Unsupported optionGSSAPICleanupCredentials [ OK ]
解决:
将/etc/ssh/sshd_config文件中以上行数内容注释下即可
Sed -i '/^GSSAPICleanupCredentials/s/GSSAPICleanupCredentialsyes/#GSSAPICleanupCredentials yes/' /etc/ssh/sshd_config
sed -i '/^GSSAPIAuthentication/s/GSSAPIAuthenticationyes/#GSSAPIAuthentication yes/' /etc/ssh/sshd_config
sed -i '/^GSSAPIAuthentication/s/GSSAPIAuthenticationno/#GSSAPIAuthentication no/' /etc/ssh/sshd_config
更新后ssh有如下提示,但不影响使用:
[root@testserver2 tmp]# ssh 10.111.32.51
/etc/ssh/ssh_config line 50: Unsupported option"gssapiauthentication"
解决:
可以注释/etc/ssh/ssh_config的gssapiauthentication内容
相关文章推荐
- CentOS 5.4 32位 OpenSSl OpenSSH升级过程.
- openssh升级7.3p1过程
- 升级OpenSSH7.2p1到OpenSSH7.6P1,升级openssl
- CentOS7.2升级openSSH为7.5P1无法登录的处理过程
- openssh升级过程
- openssh升级过程
- CentOS 6.4下OpenSSH升级到6.7操作过程详解
- Win10 Build 10134中国家庭版升级专业版过程截图曝光
- SQL Server 2008 Express 升级R2全过程
- centos6.5 openssh升级
- Android系统系统升级过程分析之------update.zip包的制作
- Android系统Recovery工作原理之使用update.zip升级过程分析(七)---Recovery服务的核心install_package函数
- Cisco 7609 ROMMON升级过程指南
- Unity5.x 项目升级过程中常见问题解决方案总结
- Android系统Recovery工作原理之使用update.zip升级过程分析(二)---update.zip差分包问题的解决
- iOS 9 升级过程汇中白苹果 iPhone或iPad 解决方案
- python2.7.6比python2.7.3升级过程中import module问题及解决方法
- CentOS 6.x 内核升级(2.6.32 -> 3.10.58)过程记录
- 从 http 升级到 https 过程中遇到的一些问题
- Unity4.x项目升级Unity5.0过程中出现的各种常见问题