通过创建安全概要文件,您可以使用保存的安全参数来对安全环境使用 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。