chsecurity

使用 chsecurity 命令可更改系统的安全套接字层 (SSL)、安全 Shell (SSH) 或传输层安全性 (TLS) 安全设置。

语法

阅读语法图跳过直观语法图 chsecurity -sslprotocolsecurity_level-sshprotocolsecurity_level

参数

切记: 这些参数是互斥的。您必须指定 -sslprotocol-sshprotocol 中的一个,但不能同时指定。
-sslprotocol security_level
(必需)指定 SSL 安全级别设置的数字值,这可以是 14 之间的任何值。3 为缺省设置值。
使用以下 sslprotocol 安全级别设置。
  • 1 不允许使用 SSL 3.0。
  • 2 仅允许使用 TLS 1.2。
  • 3 不允许使用并非专用于 1.2 的 TLS 1.2 密码套件。
  • 4 不允许使用 RSA 密钥交换密码。
注:

在 1.6.0.0 和更高版本的固件中,移除了 SHA-1 密码支持。在任何安全级别使用 SSL 或 TLS 时,不再支持以下密码:

ECDHE-RSA-AES256-SHA

ECDHE-RSA-AES128-SHA

ECDHE-RSA-DES-CBC3-SHA

ECDHE-RSA-RC4-SHA

ECDHE-RSA-NULL-SHA

  • 在将系统从任何先前发行版升级到 1.6.0.0 或更高版本时,如果使用了其中任何不受支持的密码,那么必须禁用 SSL,或者必须重新配置 SSL 以使用受支持的密码。这可能需要您生成新的 SSL 证书或者禁用 SSL。
  • 如果将其中一个不受支持的密码用于使用 1.6.0.0 或更高版本的 SSL 证书,那么可能无法再访问 Web 用户界面 (GUI)。此外,如果 LDAP 使用 SSL,那么 LDAP 服务器将变为不可访问。
-sshprotocol security_level
(必需)指定 SSH 安全级别设置的数字值,这可以是 121 是缺省值。
使用以下 sshprotocol 安全级别设置。
  • 1 允许以下密钥交换方法:
    • curve25519-sha256
    • curve25519-sha256@libssh.org
    • ecdh-sha2-nistp256
    • ecdh-sha2-nistp384
    • ecdh-sha2-nistp521
    • diffie-hellman-group-exchange-sha256
    • diffie-hellman-group16-sha512
    • diffie-hellman-group18-sha512
    • diffie-hellman-group14-sha256
    • diffie-hellman-group14-sha1
    • diffie-hellman-group1-sha1
    • diffie-hellman-group-exchange-sha1
  • 2 允许以下密钥交换方法:
    • curve25519-sha256
    • curve25519-sha256@libssh.org
    • ecdh-sha2-nistp256
    • ecdh-sha2-nistp384
    • ecdh-sha2-nistp521
    • diffie-hellman-group-exchange-sha256
    • diffie-hellman-group16-sha512
    • diffie-hellman-group18-sha512
    • diffie-hellman-group14-sha256
    • diffie-hellman-group14-sha1

描述

此命令用于更改系统上的 SSL、SSH 或 TLS 安全设置。
要点: 如果使用 SSL 或 TLS,那么更改安全性可能会中断这些服务。
如果发生中断,请使用此过程。
  1. 等待 5 分钟,然后重试。(等待所有服务重新启动。)
  2. 确认 SSL 或 TLS 实施为最新实施且支持所指定的安全级别。
  3. 如有必要,请还原为较低版本的 SSL 或 TLS 安全性。

调用示例

chsecurity -sslprotocol 4

生成的输出

Changing the SSL security level could disable the GUI connection on old web browsers, 
and changing the SSH security level may logout existing SSH sessions. Are you sure you wish to continue? (y/yes to confirm)

调用示例

chsecurity -sshprotocol 2

生成的输出

Changing the SSL security level could disable the GUI connection on old web browsers, 
and changing the SSH security level may logout existing SSH sessions. Are you sure you wish to continue? (y/yes to confirm)