Skip to content

Commit d374b7c

Browse files
committed
update docs for remote execution
1 parent 98fde78 commit d374b7c

File tree

1 file changed

+38
-6
lines changed

1 file changed

+38
-6
lines changed

README.md

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@ The Node Scraper CLI can be used to run Node Scraper plugins on a target system.
1717
options are available:
1818

1919
```sh
20-
usage: node-scraper [-h] [--sys-name STRING] [--sys-location {LOCAL,REMOTE}] [--sys-interaction-level {PASSIVE,INTERACTIVE,DISRUPTIVE}]
21-
[--sys-sku STRING] [--sys-platform STRING] [--plugin-configs [STRING ...]] [--system-config STRING]
22-
[--connection-config STRING] [--log-path STRING] [--log-level {CRITICAL,FATAL,ERROR,WARN,WARNING,INFO,DEBUG,NOTSET}]
23-
[--gen-reference-config]
20+
usage: node-scraper [-h] [--sys-name STRING] [--sys-location {LOCAL,REMOTE}] [--sys-interaction-level {PASSIVE,INTERACTIVE,DISRUPTIVE}] [--sys-sku STRING]
21+
[--sys-platform STRING] [--plugin-configs [STRING ...]] [--system-config STRING] [--connection-config STRING] [--log-path STRING]
22+
[--log-level {CRITICAL,FATAL,ERROR,WARN,WARNING,INFO,DEBUG,NOTSET}] [--gen-reference-config] [--skip-sudo]
2423
{summary,run-plugins,describe,gen-plugin-config} ...
2524

2625
node scraper CLI
@@ -39,8 +38,7 @@ options:
3938
--sys-location {LOCAL,REMOTE}
4039
Location of target system (default: LOCAL)
4140
--sys-interaction-level {PASSIVE,INTERACTIVE,DISRUPTIVE}
42-
Specify system interaction level, used to determine the type of actions that plugins can perform (default:
43-
INTERACTIVE)
41+
Specify system interaction level, used to determine the type of actions that plugins can perform (default: INTERACTIVE)
4442
--sys-sku STRING Manually specify SKU of system (default: None)
4543
--sys-platform STRING
4644
Specify system platform (default: None)
@@ -55,9 +53,43 @@ options:
5553
Change python log level (default: INFO)
5654
--gen-reference-config
5755
Generate reference config from system. Writes to ./reference_config.json. (default: False)
56+
--skip-sudo Skip plugins that require sudo permissions (default: False)
5857

5958
```
6059
60+
### Execution Methods
61+
62+
Node Scraper can operate in two modes: LOCAL and REMOTE, determined by the `--sys-location` argument.
63+
64+
- **LOCAL** (default): Node Scraper is installed and run directly on the target system. All data collection and plugin execution occur locally.
65+
- **REMOTE**: Node Scraper runs on your local machine but targets a remote system over SSH. In this mode, Node Scraper does not need to be installed on the remote system; all commands are executed remotely via SSH.
66+
67+
To use remote execution, specify `--sys-location REMOTE` and provide a connection configuration file with `--connection-config`.
68+
69+
#### Example: Remote Execution
70+
71+
```sh
72+
node-scraper --sys-name <remote_host> --sys-location REMOTE --connection-config ./connection_config.json run-plugins DmesgPlugin
73+
```
74+
75+
##### Example connection_config.json
76+
77+
```json
78+
{
79+
"InBandConnectionManager": {
80+
"hostname": "remote_host.example.com",
81+
"port": 22,
82+
"username": "myuser",
83+
"password": "mypassword",
84+
"key_filename": "/path/to/private/key"
85+
}
86+
}
87+
```
88+
89+
**Notes:**
90+
- If using SSH keys, specify `key_filename` instead of `password`.
91+
- The remote user must have permissions to run the requested plugins and access required files. If needed, use the `--skip-sudo` argument to skip plugins requiring sudo.
92+
6193
### Subcommmands
6294
6395
Plugins to run can be specified in two ways, using a plugin JSON config file or using the

0 commit comments

Comments
 (0)