#因oracle19c RAC安装报免密测试不通过的问题,故将系统的openssh8.0版本降级为openssh7.9
#降级的操作直接涉及ssh服务,将直接影响远程连接,故需要确保可以重新连接后再退出操作的会话
cp -pr /etc/ssh /etc/ssh_bak
cp /etc/pam.d/sshd /etc/pam.d/sshd_bk
rpm -e --nodeps openssh-server-8.0p1-24.0.1.el8.x86_64
rpm -e --nodeps openssh-clients-8.0p1-24.0.1.el8.x86_64
rpm -e openssh-8.0p1-24.0.1.el8.x86_64
dnf -y install zlib-devel
dnf -y install openssl-devel
dnf -y install pam-devel
dnf -y insall gcc make
wget http://ftp.jaist.ac.jp/pub/OpenBSD/OpenSSH/portable/openssh-7.9p1.tar.gz
tar -zxf openssh-7.9p1.tar.gz
cd openssh-7.9p1
./configure --prefix=/usr/local/openssh-7.9 --sysconfdir=/etc/ssh --with-pam --with-zlib --with-md5-passwords
make
make install
cd /etc/ssh
mv ssh_config ssh_config_new
mv sshd_config sshd_config_new
cp -p /etc/ssh_bak/ssh_config ./
cp -p /etc/ssh_bak/sshd_config ./
cp /root/openssh-7.9p1/contrib/redhat/sshd.init /etc/init.d/sshd
chkconfig --add sshd
chkconfig sshd on
cp /root/openssh-7.9p1/ssh-keygen /usr/bin/
cp /root/openssh-7.9p1/sshd /usr/sbin/
ln /usr/local/openssh-7.9/bin/ssh /usr/bin/ssh
ln /usr/local/openssh-7.9/bin/scp /usr/bin/scp
vim /etc/ssh/sshd_config
#注释85/86行
#GSSAPIAuthentication yes
#GSSAPICleanupCredentials no
systemctl restart sshd
systemctl status sshd.service
vim /etc/profile
SSH_HOME=/usr/local/openssh-7.9
export PATH=$SSH_HOME/bin:$SSH_HOME/sbin:$PATH
source /etc/profile
ssh -V




