修改openssh版本信息,应对漏洞扫瞄
修改openssh版本信息
/////备份sshd
#cp /usr/sbin/sshd /usr/sbin/sshd.bak.20171116
////搜索版本信息
#strings /usr/sbin/sshd | grep OpenSSH
OpenSSH_5.9p1
OpenSSH_5.9
OpenSSH_2.3.0*
OpenSSH_2.3.*
OpenSSH_2.5.3*
OpenSSH_3.*
OpenSSH_4*
OpenSSH*
OpenSSH-2.0*,OpenSSH-2.1*,OpenSSH_2.1*,OpenSSH_2.2*
OpenSSH_2.5.0p1*,OpenSSH_2.5.1p1*
OpenSSH_2.5.0*,OpenSSH_2.5.1*,OpenSSH_2.5.2*
OpenSSH_2.*,OpenSSH_3.0*,OpenSSH_3.1*
#cp /usr/sbin/sshd /usr/sbin/sshd.bak.20171116
////搜索版本信息
#strings /usr/sbin/sshd | grep OpenSSH
OpenSSH_5.9p1
OpenSSH_5.9
OpenSSH_2.3.0*
OpenSSH_2.3.*
OpenSSH_2.5.3*
OpenSSH_3.*
OpenSSH_4*
OpenSSH*
OpenSSH-2.0*,OpenSSH-2.1*,OpenSSH_2.1*,OpenSSH_2.2*
OpenSSH_2.5.0p1*,OpenSSH_2.5.1p1*
OpenSSH_2.5.0*,OpenSSH_2.5.1*,OpenSSH_2.5.2*
OpenSSH_2.*,OpenSSH_3.0*,OpenSSH_3.1*
////替换版本信息
NFAServer:~ # sed -i 's/OpenSSH_6.2p2/OpenSSH_7.4p1/g' /usr/sbin/sshd
NFAServer:~ # sed -i 's/OpenSSH_6.2/OpenSSH_7.4/g' /usr/sbin/sshd
NFAServer:~ #
NFAServer:~ # cp -p /usr/bin/ssh /usr/bin/ssh.unsafe
NFAServer:~ # sed -i 's/OpenSSH_6.2p2/OpenSSH_7.4p1/g' /usr/bin/ssh
NFAServer:~ # sed -i 's/OpenSSH_6.2/OpenSSH_7.4/g' /usr/bin/ssh
NFAServer:~ #
NFAServer:~ # /etc/init.d/sshd restart
NFAServer:~ # ssh -V
OpenSSH_7.4p1, OpenSSL 0.9.8j-fips 07 Jan 2009
目录 返回
首页