Application-Rule Commands
Application-rule commands are used for reviewing and setting application rules.
set-application-rules
Syntax:
ssh-mgr-client [global_options] set-application-rules -A <application> \
[--hostgroup <hostgroup>] [--hostnames <hostnames>] [--include-users <users>] \
[--include-user-ids <userids>] [--exclude-users <users>] \
[--exclude-user-ids <userids>] [--data <data>]
Replace the application rules of the selected application.
Select an application using its name (-A). Rules for the application can be provided using command options. Alternatively, you may provide the rules as JSON data (--data). The provided rules shall replace the old rules of the application.
Example for associating hosts to an application:
$ ssh-mgr-client set-application-rules -A "Example Application 01" \
--hostnames=server01.example.com,server02.example.com
You can define the new application rules in a JSON file (in this example: application_rules.json), for example:
{
"hostname_set": ["server01.example.com", "server02.example.com"],
"username_set": ["alice", "bob", "charlie", "root"]
}
Then set the rules to an application:
$ ssh-mgr-client set-application-rules -A "Example Application 01" \
--data '@file=application_rules.json;'
Rules may also be provided directly on the command line:
$ ssh-mgr-client set-application-rules -A "Example Application 01" \
--data '{ "hostname_set": ["server01.example.com", ...]}'
show-application-rules
Syntax:
ssh-mgr-client [global_options] show-application-rule -A <application>
Show the application rules, which determine what keys are associated to the selected application.
Select an application using its name (-A).
Example for returning the rules of a certain application:
$ ssh-mgr-client show-application-rule -A "Example Application 01"