Centos7.8更新openssh

2024-10-28 16:05:37

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

Centos7.8更新openssh

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

Centos7.8更新openssh

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

Centos7.8更新openssh

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

Centos7.8更新openssh

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

Centos7.8更新openssh

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

Centos7.8更新openssh

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

Centos7.8更新openssh

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

Centos7.8更新opensshCentos7.8更新openssh
猜你喜欢