当前位置: 首页 > news >正文

修复SSH 服务支持弱加密算法漏洞

目标机器版本信息

[root@localhost ~]# ssh -V
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017

验证安装nmap

[root@localhost ~]# sudo yum install nmap

 扫描命令

sudo nmap --script ssh2-enum-algos -p 22 192.168.3.207

扫描结果 

[root@localhost ~]# nmap --script ssh2-enum-algos -sV -p 22 192.168.3.207Starting Nmap 6.40 ( http://nmap.org ) at 2025-05-27 14:49 CST
Nmap scan report for 192.168.3.207
Host is up (0.00067s latency).
PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 7.4 (protocol 2.0)
| ssh2-enum-algos:
|   kex_algorithms (12)
|       curve25519-sha256
|       curve25519-sha256@libssh.org
|       ecdh-sha2-nistp256
|       ecdh-sha2-nistp384
|       ecdh-sha2-nistp521
|       diffie-hellman-group-exchange-sha256
|       diffie-hellman-group16-sha512
|       diffie-hellman-group18-sha512
|       diffie-hellman-group-exchange-sha1
|       diffie-hellman-group14-sha256
|       diffie-hellman-group14-sha1
|       diffie-hellman-group1-sha1
|   server_host_key_algorithms (5)
|       ssh-rsa
|       rsa-sha2-512
|       rsa-sha2-256
|       ecdsa-sha2-nistp256
|       ssh-ed25519
|   encryption_algorithms (12)
|       chacha20-poly1305@openssh.com
|       aes128-ctr
|       aes192-ctr
|       aes256-ctr
|       aes128-gcm@openssh.com
|       aes256-gcm@openssh.com
|       aes128-cbc
|       aes192-cbc
|       aes256-cbc
|       blowfish-cbc
|       cast128-cbc
|       3des-cbc
|   mac_algorithms (10)
|       umac-64-etm@openssh.com
|       umac-128-etm@openssh.com
|       hmac-sha2-256-etm@openssh.com
|       hmac-sha2-512-etm@openssh.com
|       hmac-sha1-etm@openssh.com
|       umac-64@openssh.com
|       umac-128@openssh.com
|       hmac-sha2-256
|       hmac-sha2-512
|       hmac-sha1
|   compression_algorithms (2)
|       none
|_      zlib@openssh.com
MAC Address: 00:0C:29:AB:7F:1D (VMware)Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 0.67 seconds

修改建议

临时规避办法vim /etc/ssh/sshd_config

去掉 arcfour、arcfour128、arcfour256 等弱加密算法,重启sshd

Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc

----------------------------------此次以上步骤已经完成---------------------------------------- 

 若彻底解决升级openssh

[root@localhost ~]# ssh -V
OpenSSH_9.8p1, OpenSSL 3.4.0 22 Oct 2024
Starting Nmap 6.40 ( http://nmap.org ) at 2025-05-27 15:07 CST
Nmap scan report for 192.168.3.239
Host is up (0.00072s latency).
PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 9.8 (protocol 2.0)
| ssh2-enum-algos:
|   kex_algorithms (12)
|       sntrup761x25519-sha512@openssh.com
|       curve25519-sha256
|       curve25519-sha256@libssh.org
|       ecdh-sha2-nistp256
|       ecdh-sha2-nistp384
|       ecdh-sha2-nistp521
|       diffie-hellman-group-exchange-sha256
|       diffie-hellman-group16-sha512
|       diffie-hellman-group18-sha512
|       diffie-hellman-group14-sha256
|       ext-info-s
|       kex-strict-s-v00@openssh.com
|   server_host_key_algorithms (4)
|       rsa-sha2-512
|       rsa-sha2-256
|       ecdsa-sha2-nistp256
|       ssh-ed25519
|   encryption_algorithms (6)
|       chacha20-poly1305@openssh.com
|       aes128-ctr
|       aes192-ctr
|       aes256-ctr
|       aes128-gcm@openssh.com
|       aes256-gcm@openssh.com
|   mac_algorithms (10)
|       umac-64-etm@openssh.com
|       umac-128-etm@openssh.com
|       hmac-sha2-256-etm@openssh.com
|       hmac-sha2-512-etm@openssh.com
|       hmac-sha1-etm@openssh.com
|       umac-64@openssh.com
|       umac-128@openssh.com
|       hmac-sha2-256
|       hmac-sha2-512
|       hmac-sha1
|   compression_algorithms (2)
|       none
|_      zlib@openssh.com
MAC Address: 00:0C:29:58:FC:7A (VMware)Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 0.67 seconds

相关文章:

  • 【实战】Tennis-Tracking 安装与运行完整教程(含 CUDA/TF 报错解决)
  • C++优先队列(priority_queue)使用详解
  • SQL 查询慢的常见原因分析
  • STL容器使用中的常见问题解析
  • 【调试】【原理理解】ldm 和 diffusers 库的区别
  • 院校机试刷题第十三天:代码随想录算法训练营第七天
  • VectorNet:自动驾驶中的向量魔法
  • fabric 是一个开源框架,用于使用 AI 增强人类能力。它提供了一个模块化框架,用于使用一组可在任何地方使用的众包人工智能提示来解决特定问题
  • 关于CSDN和Github的操作
  • 安卓证书的申请(保姆级图文)
  • 基于递归思想的系统架构图自动化生成实践
  • 电子信息科学与技术专业生涯规划书-嵌入式方向(大一下)
  • 计算机组成原理:IEEE 754标准
  • Linux Shell 切换
  • 建筑八大员劳务员考试题及答案解析
  • 今日行情明日机会——20250527
  • 3.8.4 利用RDD实现分组排行榜
  • 国产化Word处理控件Spire.Doc教程:在 C# 中打印 Word 文档终极指南
  • C-自定义类型
  • 机器学习知识体系:从“找规律”到“做决策”的全过程解析
  • 适合学生做网站的图片/seo诊断工具网站
  • 惠州网站营销推广/河北网站seo地址
  • 店铺装修设计网站/百度推广有效果吗?
  • 无极网站/爱站
  • 会建网站的人/91永久免费海外地域网名
  • 网站代/seo自学网站