Centos7.8更新openssh
1、安装telnet工具。(为了避免在升级的过程中断开)#yum -y install telnet*

3、关闭或者修改安全配置文件注:(否则root无法telnet登录)#mv /etc/securetty /etc/securetty.bak

5、使用xftp工具上传更新包。

7、切换至安装包目录,执行配置脚本。# cd openssh-9.4p1-xx# ./configure --prefix=/usr/local/openssh --with-zlib=/usr/local/zlib --with-ssl-dir=/usr/openssl

9、卸载原系统yum安装的openssh包# yum remove openssh

12、编辑sshd_config配置文件修改如图所示的三个地方,保存退出。# vi /etc/ssh/sshd_config#wq

14、添加sshd系统启动,并启动sshd服务# chkconfig --add sshd# systemctl start sshd.service

15、查看openssh 运行状态,并添加openssh 开机自启服务。查看openssh和openssl 版本# systemctl status sshd.service# systemctl enable sshd.service# ssh -V

