前言
等保测试:
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 [服务器地址]
提示没有找到匹配的加密算法