OpenSSH升级-无需替换旧版本文件

下载地址:https://openbsd.hk/pub/OpenBSD/OpenSSH/portable/openssh-7.6p1.tar.gzc++

安装方式:直接替换老版本的OpenSSH,无需进行任何的替换操做。
注意事项ssh

++OpenSSH源码升级包建议放在/root/目录下,禁止放在/tmp/目录下++
++确保旧版本的OpenSSH可以正常使用++

-------------------------------------------------------------------------------------------------
确认是否安装如下依赖包:
openssl openssl-devel pam-devel gcc gcc-c++ zlib zlib-devel zlib-staticide

确认是否安装依赖包:
例如:[root@localhost ~]# rpm -qa openssl测试

解压源码
[root@localhost ~]# tar -xvf openssh-7.6p1.tar.gzrest

安装步骤:code

[root@localhost ~]# cd openssh-7.6p1
[root@localhost ~]# ./configure --prefix=/usr/ --sysconfdir=/etc/ssh --with-ssl-engine --with-pam --with-md5-passwords
[root@localhost ~]# make -j4
[root@localhost ~]# make install

OpenSSH 7.6不支持协议GSSAPIAuthentication,须要禁用:
修改配置文件/etc/ssh/sshd_config:ip

注释行1:GSSAPIAuthentication yes
注释行2:GSSAPICleanupCredentials yes
设置参数:PermitRootLogin 设置为 yes

修改配置文件/etc/ssh/ssh_config:
注释行:GSSAPIAuthentication yesmd5


重启sshd服务:
[root@localhost ~]# service sshd restartssl

命令测试
ssh -V
测试以下所示:get

[root@localhost ~]# ssh -V
OpenSSH_7.6p1, OpenSSL 1.0.1e-fips 11 Feb 2013

telnet测试
telnet 127.0.0.1 22

相关文章
相关标签/搜索