openssh升级
ssh -V cp -a /etc/ssh/sshd_config /etc/ssh/sshd_config.bak yum remove openssh-* -y yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make -y #安装依赖 tar xzf openssh-8.8p1.tar.gz cd openssh-8.8p1 ./configure --prefix=/usr --sysconfdir=/etc/ssh --with-md5-passwords --with-privsep-path=/var/lib/sshd #配置 make & make install #编译安装 ssh -V cp -p contrib/redhat/sshd.init /etc/init.d/sshd #拷贝启动文件 chkconfig --add sshd #添加自启动 chkconfig sshd on #开机自启动 chkconfig --list sshd #查看自启动 #官网介绍需要新版本算法更新,需要新增两个配置项,之前配置的密钥才能正常登录 vim /etc/ssh/sshd_config HostkeyAlgorithms +ssh-rsa PubkeyAcceptedAlgorithms +ssh-rsa systemctl restart sshd #重启