chsecurity
使用 chsecurity 指令可變更系統的 Secure Sockets Layer (SSL)、安全 Shell (SSH) 或傳輸層安全 (TLS) 安全設定。
語法
>>-chsecurity--+- -sslprotocol--security_level-+--------------->< '- -sshprotocol--security_level-'
參數
記住: 這些參數互斥。您必須指定 -sslprotocol 或 -sshprotocol 其中一個,不能同時指定。
- -sslprotocol security_level
- (必要)指定 SSL 安全層次設定的數值,可以為 1 到 4 的任何值。設定 3 為預設值。安全層次設定:
- 1 不容許使用 SSL 3.0。
- 2 只容許 TLS 1.2。
- 3 另外還不容許使用非專用於 1.2 的 TLS 1.2 密碼組合。
- 4 另外還不容許使用 RSA 金鑰交換密碼。
- -sshprotocol security_level
- (必要)指定 SSH 安全層次設定的數值,可以為 1 或 2 的值。設定 1 為預設值。安全層次設定:
- 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
- 1 容許下列金鑰交換方法:
說明
此指令將變更系統上的 SSL、SSH 或 TLS 安全設定。重要: 如果您使用 SSL 或 TLS,變更安全性可能會中斷這些服務。
如果發生這種情況:
- 請等待 5 分鐘,然後再試一次。(等待所有服務重新啟動。)
- 確認 SSL 或 TLS 實作是最新的,且支援指定的安全層次。
- 必要的話,請回復至 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 以確認)
呼叫範例
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 以確認)
