升级openssh

wget https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-8.6p1.tar.gz
tar xvf openssh-8.6p1.tar.gz
./configure
yum -y group install "Development Tools"
yum -y install openssl-devel
make &&make install
#备份
cp /usr/lib/systemd/system/sshd.service{,.bak}
#验证
ll /usr/lib/systemd/system/sshd.service*
#修改配置
 cat > /usr/local/etc/sshd_config <<EOF
UseDNS no
AddressFamily inet
SyslogFacility AUTHPRIV
PermitRootLogin yes
PasswordAuthentication yes
Banner /etc/ssh/ssh_banner
EOF
cat >/usr/lib/systemd/system/sshd.service <<EOF
[Unit]
Description=OpenSSH server daemon
[Service]
ExecStart=/usr/local/sbin/sshd -f /usr/local/etc/sshd_config -D
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl   restart sshd

验证

https://github.com/Rhynorater/CVE-2018-15473-Exploit
pip3 install paramiko==2.4.1
python3 sshUsernameEnumExploit.py --port 20022 --userList exampleInput.txt your-ip