2.0 KiB
2.0 KiB
MultiSshDeployer
This tool provides a straightforward way to execute multiple Bash commands on various devices.
How to use
- Launch a terminal and navigate to this directory.
- Execute
npm installto install all necessary dependencies. - Enter
npm startto generate a newconfig.jsonfile within the directory. - Modify the
config.jsonfile to configure your deployment settings. - Run
npm startonce more to initiate the deployment of Bash commands. - The outputs from each device will be saved in the output folder.
Configuration
This tool features an easy-to-use configuration that can be modified through the config.json file. If the file is not present, run npm start to generate it. Below is an example of a typical configuration:
{
"addresses": ["192.168.0.100", "192.168.0.101:80"],
"username": "username",
"password": "password",
"payload": [
"ls -l",
"reboot",
"exit"
]
}
| Property | Type | Description |
|---|---|---|
| addresses | string[] | This is a list of device addresses. If no port is specified, it will default to port 22. |
| username | string | Represents the SSH username. |
| password | string | Indicates the SSH password. |
| payload | string[] | A list of Bash commands to be executed. |
Output
While running the tool, all SSH output will be displayed in the console and saved to a log file within the output directory. Each log file will be named using the corresponding device address. Please note that if a log file with the same name already exists in the output directory, it will be overwritten!