ssh服务离线和在线升级方案
================================================================================================
离线安装步骤
================================================================================================
相关资源: 下载 openssh
================================================================================================
1,安装gcc的rpm包
rpm -ivh *.rpm --nodeps --force
2.安装perl的rpm包
rpm -ivh *.rpm --nodeps --force
下载ssh的8.0的包,上传并解压
tar zxvf openssh-8.2p1.tar.gz
cd openssh-8.2p1
rpm -qa |grep openssh
执行如下脚本
for i in $(rpm -qa |grep openssh);do rpm -e $i --nodeps ;done
./configure --prefix=/usr --sysconfdir=/etc/ssh --with-md5-passwords--with-pam --with-tcp-wrappers --with-ssl-dir=/usr/local/ssl --without-hardening
rm -rf /etc/ssh
make&&make install
cp ./contrib/redhat/sshd.init /etc/init.d/sshd
chkconfig --add sshd
chkconfig sshd on
chkconfig --list|grep sshd
sed -i "32 aPermitRootLogin yes" /etc/ssh/sshd_config
service sshd restart
/////////////////////////////////////////////////////////////////////////////////////////
若这个时候发现是无法远程登录的
vim /etc/sysconfig/selinux
enforcing改成permissive
setenforce 0
service sshd restart
========================================================================================================================================
原创:http://note.youdao.com/noteshare?id=9af4e40dabdc52dc2407a247fe2a9b52