OPenssh 下载地址:

http://www.openssh.com/ 

 

以下步骤

OS: 6.x  安装Opensshd 7.4p1 验证通过

      6.8  安装Opensshd 7.6p1 验证通过

 

请自行配置Yum和下载Opensshd ,其他不用下载。如果遇到提示openssl 需升级的提示则以下方案不适用。

注意:以下方案并没有卸载自带的 sshd ,因为卸载后会遇到 /etc/security/limits.conf 文件失效的问题。

1.安装相关包

yum install -y gcc zlib zlib-devel pam pam-devel openssl openssl-devel
2. 解压并配置 openssh-7.4p1
tar -xzvf openssh-7.4p1.tar.gz
cd openssh-7.4p1
./configure –prefix=/usr –sysconfdir=/etc/ssh –with-md5-passwords –with-pam
3. 安装openssh-7.4p1
make&&make install
vi /etc/ssh/sshd_config 
注释掉如下2行(大概81/82行)
#GSSAPIAuthentication yes
#GSSAPICleanupCredentials yes

注意:升级后默认不允许root 账户直接登录,如果需要请取消下面的注释 

#PermitRootLogin yes 

 

vi /etc/ssh/ssh_config    (line50 注释掉)
#GSSAPIAuthentication yes 
4.替换init.d/sshd启动服务
cd contrib/redhat;
mv -f /etc/init.d/sshd /etc/init.d/sshdbak`date +%Y%m%d`;
cp sshd.init /etc/init.d/sshd;
chmod u+x /etc/init.d/sshd;
chkconfig –add sshd;
service sshd restart
5.检查当前openssh版本
ssh -V
OpenSSH_7.4p1, OpenSSL 1.0.1e-fips 11 Feb 2013
6.重启验证
service sshd restart

版权声明:本文为plluoye原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/plluoye/p/8423545.html