修改version.h 大部分漏洞要求隐藏
(1)version.h
#define SSH_VERSION "OpenSSH_8.4" 改 "*"
#define SSH_PORTABLE "p1" 改 "*"
#define SSH_RELEASE SSH_VERSION SSH_PORTABLE
(2)sshd 中隐藏 ssh版本信息
获取版本信息 sshd -v
cd /usr/sbin/
sed -i "s/OpenSSH_7.5p1/ /g" sshd;
sed -i "s/OpenSSH_7.5/ /g" sshd
测试SSH banner信息的获取
nc 192.168.x.x 22
nmap -sV -p 22 IP地址
config配置说明
配置openssl 加密库
配置zlib 压缩插件
配置passwords 密码位置
#注意下,配置的路径后续还需要改, ./configure --prefix=/usr/local/openssh/ --sysconfdir=/etc/ssh --with-md5-passwords --with-pam --with-zlib --with-openssl-includes=/usr --with-privsep-path=/var/lib/sshd