暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

openssh降版本操作

原创 路露 2025-02-25
218

#因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

最后修改时间:2025-02-25 14:56:02
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论