/////查找sshd的位置
# whereis sshd
/////备份sshd
# cp /usr/sbin/sshd /usr/sbin/sshd.bak.20200202
////搜索版本信息
# 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*
////替换版本信息
# sed -i 's/OpenSSH_5.9/OpenSSH_7.7/g' /usr/sbin/sshd
# service sshd restart
################################################
 
具体测试效果:
cp
/usr/sbin/sshd /usr/sbin/sshd.bak.20190909 strings /usr/sbin/sshd | grep OpenSSH sed -i 's/OpenSSH_7.2p2/OpenSSH_8.0p1/g' /usr/sbin/sshd service sshd restart
使用 telnet 或者 nmap 验证修改效果 telnet
127.0.0.1 22
nmap 127.0.0.1 -p 22

 

相关文章:

  • 2022-12-23
  • 2022-01-12
  • 2021-11-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-05
  • 2021-11-23
  • 2022-02-17
  • 2022-12-23
  • 2021-09-30
  • 2021-08-28
  • 2022-02-16
相关资源
相似解决方案