禁用 Arcfour 加密

Ste*_*ype 6 ssh encryption centos

我对此很陌生,但一直在到处寻找明确的答案。

要通过 PCI 合规性,应禁用 Arcfour 密码。

我试图编辑我的 sshd_conf 和 ssh_conf 文件中的密码无济于事。

据我所知,默认密码是

Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
Run Code Online (Sandbox Code Playgroud)

我已经厌倦了从该行中删除 arcfour 实例,并在它们之前添加了一个“-”(减号),这也不起作用。

如何禁用 arcfour 密码?

我们正在运行 CentOS 6.8 以防万一。

小智 8

CentOS 5、6 和 7 在 /etc/ssh/sshd_config 文件中没有 Ciphers 行,因此您可以获得完整的默认密码列表。因此,要排除 arcfour,请将以下几行添加到您的 sshd_config 文件中:

# restrict ciphers to exclude arcfour
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc
Run Code Online (Sandbox Code Playgroud)

然后重启sshd:

服务 sshd 重启

如上所述,您可以使用

ssh <hostname> -c arcfour
Run Code Online (Sandbox Code Playgroud)

如果指定的密码被禁用,您将收到类似的响应

no matching cipher found: client arcfour server aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc
Run Code Online (Sandbox Code Playgroud)

否则你会看到正常的登录过程。


Jan*_*Jan 0

步骤1

从 sshd 配置中删除密码“arcfour128”、“arcfour256”和“arcfour”。

第2步

重新启动 sshd:service sshd restart

相关阅读: https: //wiki.centos.org/HowTos/Network/SecuringSSH

  • 那么要么 nmap 错误,要么你的 sshd 使用另一个配置文件。您是否 100% 确定您编辑了服务器配置文件 (/etc/ssh/sshd_config) 而不是全局客户端配置?你重启了吗? (2认同)