OpenSSH升级版本到最新(8.4)

本文涉及的产品
运维安全中心(堡垒机),免费版 6个月
简介: OpenSSH升级版本到最新(8.4)

1、依赖软件包:

yum install wgetgcc-yyum install -y zlib-devel openssl-devel 
yum install pam-devel libselinux-devel zlib-devel openssl-devel -y

2、下载安装包OpenSSH8.4上传至服务器或wget直接下载

wget https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-8.4p1.tar.gz

3、删除低版本OpenSSH的的rpm包

rpm -e--nodeps`rpm -qa | grep openssh`

4、安装openssh

(1).解压

tar -zxvf openssh-8.4p1.tar.gz
cd  openssh-8.4p1

(2).配置

 ./configure   --prefix=/usr   --sysconfdir=/etc/ssh    --with-md5-passwords--with-pam--with-zlib--with-tcp-wrappers--with-ssl-dir=/usr/local/ssl   --without-hardening

(3).编译安装

makemake install

(4)赋权

chmod600 /etc/ssh/ssh_host_rsa_key /etc/ssh/ssh_host_ecdsa_key /etc/ssh/ssh_host_ed25519_key

(5)复制配置文件并设置允许root用户远程登录

cp-a contrib/redhat/sshd.init  /etc/init.d/sshd
cp-a contrib/redhat/sshd.pam /etc/pam.d/sshd.pam
chmod u+x /etc/init.d/sshd
vim /etc/ssh/sshd_config

1.修改#PermitRootLogin prohibit-password项,去掉注释#并把prohibit-password改为yes,修改后即为PermitRootLogin yes

2.去掉注释#PasswordAuthentication yes变为PasswordAuthentication yes

(6)添加添加自启服务ssh到开机启动项

chkconfig --add sshd
chkconfig sshd on

(7)重启服务

systemctl restart sshd

(8)查看下安装结果:

ssh-V
目录
相关文章
|
4月前
|
安全 Linux
CentOS7下快速升级至OpenSSH9.4p1安全版本
CentOS7下快速升级至OpenSSH9.4p1安全版本
457 1
|
4月前
|
安全 Linux Shell
CentOS7下快速升级至OpenSSH9.3p2安全版本
CentOS7下快速升级至OpenSSH9.3p2安全版本
400 0
|
网络安全 开发工具 C语言
升级OpenSSH
升级OpenSSH
702 0
|
安全 Linux Shell
CentOS7下快速升级OpenSSH至8.9p1安全版本
CentOS7下快速升级OpenSSH至8.9p1安全版本
3212 0
CentOS7下快速升级OpenSSH至8.9p1安全版本
|
关系型数据库 MySQL Linux
Centos7升级openssl,超详细
Centos7升级openssl,超详细
2240 0
|
1月前
|
Ubuntu Linux 网络安全
在Ubuntu上离线升级OpenSSH
本文介绍了在Ubuntu系统上离线升级OpenSSH的详细步骤,包括移除旧版本、解压新版本、编译安装、解决依赖问题、替换相关命令、重启SSHD服务以及验证升级结果。
93 1
|
1月前
|
安全 Linux 网络安全
Linux——OpenSSH如何升级到最新版本
Linux——OpenSSH如何升级到最新版本
54 0
Linux——OpenSSH如何升级到最新版本
|
2月前
|
Linux C语言 Perl
centos实现离线更新openssh
在CentOS上离线更新OpenSSH: 升级完成后, OpenSSH 版本应为 9.3。务必先备份重要数据与配置并测试系统。
207 2
|
安全 算法 中间件
CentOS7下rpm包方式升级openssl到安全版本1.1.1n
CentOS7下rpm包方式升级openssl到安全版本1.1.1n
3633 0
CentOS7下rpm包方式升级openssl到安全版本1.1.1n
|
Linux
升级CentOS到最新版本
升级CentOS到最新版本
278 0