- 16 Mar 2023
- 1 Minute to read
- Print
- DarkLight
- PDF
Axonius - Deploy Files and Run Shell Command on Linux Assets
- Updated on 16 Mar 2023
- 1 Minute to read
- Print
- DarkLight
- PDF
Axonius - Deploy Files and Run Shell Command on Linux Assets (Deploy Files and Run Linux Shell Command) action allows you to populate a field with the output of running the command supplied in the Command field via SSH, on each of the query results entities, which are Linux devices.
- Not all asset categories are supported for all Enforcement Actions.
- See Actions supported for Activity Logs, Adapters Fetch History, and Asset Investigation modules.
- See Actions supported for Vulnerabilities.
- See Actions supported for Software.
General Settings
- Action name - The name of this Enforcement Action. The system sets a default name. You can change the name.
- Configure Dynamic Values - Toggle on to enter a Dynamic Value statement. See Creating Enforcement Action Dynamic Value Statements to learn more about Dynamic Value statement syntax.
To configure the Deploy Files and Run Linux Shell Command action, do as follows:
From the Action Library, click Deploy Files and Run Commands, and then click Deploy Files and Run Linux Shell Command.
Define a unique action name.
Specify the information required to run the Linux Shell Command. Most of the action configuration and logic are the same as the ones used when Connecting Linux SSH Adapter.
Specify the command you want to run on the Linux device. Add a condition to the command (for example, '&& echo Success || echo Fail') to print the result into the Command Name field. This field can then be used in future queries.
To deploy a single or multiple files on the Linux device:
- Choose a file to be uploaded. You can upload one or multiple files. Existing files will be overridden.
- Specify the path on the Linux device the files will be uploaded. If not populated, the files are uploaded to "/tmp" folder.
- To delete the files afer executing the specified command line, select the Delete Files After Execution checkbox.
- Specify the permissions given to the uploded files. This Defaults to "777".
If you are using multi-nodes, choose the Axonius node to use to interact with the adapter when executing the enforcement action.
Save the action.
For more details about other Enforcement Actions available, see Action Library.