透過建立安全設定檔,您可以利用已儲存的安全參數,將 xscmd 公用程式與安全環境搭配使用。
關於這項作業
您可以將 -ssp profile_name 或 --saveSecProfile profile_name 參數與其餘 xscmd 指令搭配使用,以儲存安全設定檔。設定檔可以包含使用者名稱及密碼、認證產生器、金鑰儲存庫、信任儲存庫及傳輸類型的設定。
xscmd 公用程式中的
ProfileManagement 指令群組包含用於管理安全設定檔的指令。
程序
- 儲存安全設定檔。
若要儲存安全設定檔,請將
-ssp profile_name 或
--saveSecProfile profile_name 參數與其餘指令搭配使用。如果將此參數新增至指令,則將儲存下列參數:
-al,--alias <alias>
-arc,--authRetryCount <integer>
-ca,--credAuth <support>
-cgc,--credGenClass <className>
-cgp,--credGenProps <property>
-cxpv,--contextProvider <provider>
-ks,--keyStore <filePath>
-ksp,--keyStorePassword <password>
-kst,--keyStoreType <type>
-prot,--protocol <protocol>
-pwd,--password <password>
-ts,--trustStore <filePath>
-tsp,--trustStorePassword <password>
-tst,--trustStoreType <type>
-tt,--transportType <type>
-user,--username <username>
安全設定檔儲存在 user_home\.xscmd\profiles\security\<profile_name>.properties目錄中。
重要: 請勿在 profile_name 參數中包括 .properties 副檔名。此副檔名將自動新增至檔名。
- 使用已儲存的安全設定檔。
若要使用已儲存的安全設定檔,請將 -sp profile_name 或 --securityProfile profile_name 參數新增至您正在執行的指令。
指令範例:xscmd
-c listHosts -cep myhost.mycompany.com -sp myprofile
- 列出 ProfileManagement 指令群組中的指令。
請執行下列指令:xscmd -lc
ProfileManagement。
- 列出現有安全設定檔。
請執行下列指令:xscmd -c listProfiles -v。
- 顯示儲存在安全設定檔中的設定。
請執行下列指令:xscmd -c showProfile
-pn profile_name。
- 移除現有安全設定檔。
請執行下列指令:xscmd -c RemoveProfile -pn profile_name。