diff --git a/benchmarks/access-and-control/1.41-ensure-ssh-server-use-protocol_2.md b/benchmarks/access-and-control/1.41-ensure-ssh-server-use-protocol_2.md new file mode 100644 index 0000000000000000000000000000000000000000..dc49e378548f1ac2ab61b9a7e2b3a2c2a1fd66ee --- /dev/null +++ b/benchmarks/access-and-control/1.41-ensure-ssh-server-use-protocol_2.md @@ -0,0 +1,38 @@ +# 1.41-ssh服务使用协议2 + +## 安全等级 + +Level 1 + +## 描述 + +建议ssh服务使用相对于旧版本(1)更安全的协议2 + +## 修复建议 + +ssh配置中确保 protocol 2 ,存在该选项则修改为2,没有则添加: + +1.执行以下命令,修改或添加ssh配置文件中的Protocol配置: + +```shell +# grep -qiP '^Protocol' /etc/ssh/sshd_config && sed -i "/^Protocol/cProtocol 2" /etc/ssh/sshd_config || echo -e "Protocol 2" >> /etc/ssh/sshd_config +``` + +2.执行以下命令,重启sshd服务: + +```shell +# systemctl restart sshd +``` + +## 扫描检测 + +查看ssh配置文件Protocol行内容 + +```shell +# grep -R "^Protocol" /etc/ssh/sshd_config +Protocol 2 +``` + +如结果为`Protocol 2`,则视为通过此项检查。 + +## 参考