#下载文件:
wget "https://openbsd.hk/pub/OpenBSD/OpenSSH/portable/openssh-8.3p1.tar.gz"
#解压:
tar -zxvf openssh-8.3p1.tar.gz && cd openssh-8.3p1
#停止服务:
systemctl stop sshd
#删除历史文件:
yum remove openssh -y
#安装依赖:
yum install gcc openssl-devel zlib-devel -y
#执行安装:
./configure --prefix=/usr --sysconfdir=/etc/ssh --with-md5-passwords--with-pam --with-tcp-wrappers --with-ssl-dir=/usr/bin/openssl --without-hardening
make && make install
#删除报错提示的key文件
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0640 for '/etc/ssh/ssh_host_ed25519_key' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
###############################
[root@proxy openssh-8.3p1]# rm -f /etc/ssh/ssh_host_ed25519_key
#修改/etc/ssh/sshd_config配置文件
PermitRootLogin yes #允许root登录
#配置自启动
cp contrib/redhat/sshd.init /etc/init.d/sshd
chkconfig --add sshd
chkconfig sshd on
chkconfig --list|grep sshd
service sshd start
ssh -V