在可行的情況下,虛擬應用程式安裝 (OVF) 都有預設的強化組態。使用者可以檢驗組態檔案中全域選項區段中的伺服器及用戶端服務,來確認其組態已適當強化。

程序

  1. 開啟 /etc/ssh/sshd_config 伺服器組態檔案,確認設定都正確無誤。
    設定 狀態
    伺服器常駐程式通訊協定 Protocol 2
    加密方式 [email protected],[email protected],aes256-ctr,aes192-ctr,aes128-ctr
    TCP 轉送 AllowTCPForwarding no
    伺服器閘道連接埠 Gateway Ports no
    X11 轉送 X11Forwarding no
    SSH 服務 使用 AllowGroups 欄位,針對可使用服務的使用者,指定獲允許可存取次要群組及新增成員至其中的群組。
    GSSAPI 驗證 GSSAPIAuthentication no (若未使用此設定)
    Kerberos 驗證 KerberosAuthentication no (若未使用此設定)
    本機變數 (AcceptEnv 全域選項) 設定為停用 (註解掉)啟用 (僅限 LC_* 或 LANG 變數)
    通道組態 PermitTunnel no
    網路工作階段 MaxSessions 1
    嚴格模式檢查 Strict Modes yes
    權限區別 UsePrivilegeSeparation yes
    rhosts RSA 驗證 RhostsRSAAuthentication no
    壓縮 Compression delayed 或 Compression no
    訊息驗證碼 [email protected],[email protected],[email protected],hmac-sha2-512,hmac-sha2-256,hmac-sha1
    使用者存取限制 PermitUserEnvironment no
    KexAlgorithms diffie-hellman-group14-sha1,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521
  2. 確保 ListenAddress 列已取消註解並設定為有效的本機 IP。
    例如, ListenAddress 0.0.0.0

    0.0.0.0 取代為 vRealize Operations 節點的 IP 位址。

    例如,ListenAddress 192.168.168.10

  3. 儲存變更並關閉檔案。在命令列中,執行以下命令以套用變更的設定:# systemctl restart sshd.service