The Key Agent can be managed and controlled from your command line using the Command Line Interface (CLI). The CLI allows you to send commands to the Key Agent directly from your operating system’s command line.
In order to send commands to the Key Agent, you must first invoke the CLI. The process for this depends on the operating system where the key agent is installed.
Invoke the CLI
No batch script is needed. Instead, call java directly to enter the following command from the command prompt:
cd keyagent java -classpath .\shnkeyagent.jar com.shn.keyagent.cli.ShnKeyAgentCli
For Key Agent v3.6, use a shell script to enter the following:
kumar@suren-dev-proxy:~$ cd shnka kumar@suren-dev-proxy:~/shnka$ pwd /home/surendrakumar/shnka kumar@suren-dev-proxy:~/shnka$ ./shnka-cli.sh
For Key Agent v5.1.1, use a shell script to enter the following:
kumar@suren-dev-proxy:~/shnka$./KeyAgentInstallerI4j-18.104.22.168-unix64.sh -Venv=https://www.myshn.net/shnproxyapi -VEnableLocalKeystoreOption=true
No batch script is needed. Instead, call java directly to enter the following command from the terminal:
cd keyagent java -classpath ./shnkeyagent.jar com.shn.keyagent.cli.ShnKeyAgentCli
Use CLI Commands
Once the CLI has been invoked, enter the following commands to get information about the Key Server or modify Key Server settings:
keyserverSets the keyserver information. It needs the keystore password, which can not be passed via parameter.
detailsReturns the keyserver settings. (The password is not shown).
show keyserver connectivityShows the connectivity between the keyagent and keyserver.
set envSets the MVISION Cloud environment details. It needs the dashboard password, which can not be passed via parameter.
show env detailsShows the environment settings.
show env connectivityShows the connectivity between the keyagent and the MVISION Cloud dashboard (env).
set proxySets the proxy details. (If the password is needed, then it will ask).
show proxy detailsShows the proxy details.