屏蔽SSH服务的弱密码算法
·
前言
等保测试:
1、目标主机SSH服务存在RC4、CBC或None弱加密算法
2、如果配置为CBC模式的话,SSH没有正确地处理分组密码算法加密的SSH会话中所出现的错误
解决办法:仅保留CTR加密算法
参考文章
1、编辑 ssh 配置文件
vim /etc/ssh/sshd_config
2、把弱加密方式都排除掉,我这边保留的如下内容
Ciphers aes128-ctr,aes192-ctr,aes256-ctr
MACs hmac-sha1,hmac-ripemd160
参考内容:
# default is aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,
# aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,
# aes256-cbc,arcfour
# you can removed the cbc ciphers by adding the line
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,arcfour
# default is hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96
# you can remove the hmac-md5 MACs with
MACs hmac-sha1,hmac-ripemd160
3、测试
执行命令
ssh -vv -oCiphers=aes128-cbc,3des-cbc,blowfish-cbc [服务器地址]
提示没有找到匹配的加密算法

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐


所有评论(0)