
# 启用/禁用不安全算法
#### 操作场景
堡垒机提供不安全算法开关，禁用不安全算法配置后，将禁止堡垒机使用不安全算法（如[表1]所示），可提升业务安全。
堡垒机默认禁用不安全算法。但在部分特殊场景下，需要启用不安全算法，例如下述场景：
- **与第三方系统对接**：当堡垒机需要与使用不安全算法的第三方系统或老旧设备进行对接时，由于第三方系统可能暂不支持新算法，为保证业务正常流转，需启用不安全算法。
- **老旧设备兼容**：当企业存在使用不安全算法的老旧系统或老旧设备时，为保障运维管理工作的连续性，需启用不安全算法以实现向后兼容。
- **平滑过渡场景**：企业在进行密码算法升级改造的过渡阶段，部分老旧系统暂不支持新算法，需临时启用不安全算法以确保业务平稳迁移。
 
#### 注意事项
由于不安全算法存在安全风险，建议在不使用这些不安全算法后，及时禁用该配置，并避免在启用状态下输入敏感信息。
#### 前提条件
当前用户所属角色已拥有"系统"模块的管理权限，如何查看各角色的权限，请参见[角色](https://support.huaweicloud.com/usermanual-cbh/cbh_02_001402.html)。
#### 启用/禁用不安全算法
1. [登录堡垒机系统](https://support.huaweicloud.com/usermanual-cbh/cbh_02_0003.html)。
2. 在左侧导航栏，选择"系统 \> 系统配置 \> 安全配置"，进入安全配置管理页面。
3. 在"算法配置"区域右侧，单击"编辑"。 
   图1算法配置   
   ![](https://support.huaweicloud.com/usermanual-cbh/zh-cn_image_0000002581923274.png "点击放大")
   
   
4. 打开或关闭不安全算法开关后，单击"确定"。 
   图2启用不安全算法   
   ![](https://support.huaweicloud.com/usermanual-cbh/zh-cn_image_0000002612323117.png "点击放大")
   
   
 
#### 不安全算法说明
本功能限制的不安全算法如[表1]所示。
 表1不安全算法 
| **Kex**                                                                                                                                                                                                                                                                                                                             | **Hostkey**                                                                                                                                                                                                                                                                                                                                                                   | **Cipher**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | **MAC**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
|:---|:---|:---|:---|
| - diffie-hellman-group-exchange-sha1  - diffie-hellman-group14-sha1  - diffie-hellman-group1-sha1   | - ssh-rsa  - ssh-dss  - ssh-rsa-cert-v01@openssh.com  - ssh-dss-cert-v01@openssh.com   | - aes128-cbc  - aes192-cbc  - aes256-cbc  - rijndael-cbc@lysator.liu.se  - blowfish-cbc  - blowfish-ctr  - cast128-cbc  - cast128-ctr  - idea-cbc  - idea-ctr  - serpent128-cbc  - serpent192-cbc  - serpent256-cbc  - 3des-cbc  - 3des-ctr  - twofish128-cbc  - twofish192-cbc  - twofish256-cbc  - twofish-cbc  - arcfour  - arcfour128  - arcfour256   | - hmac-sha1-96  - hmac-sha1-96@openssh.com  - hmac-md5  - hmac-md5-etm@openssh.com  - hmac-md5-96  - hmac-md5-96-etm@openssh.com   |
   
