multiSSH3 4.98__tar.gz → 4.99__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of multiSSH3 might be problematic. Click here for more details.
- {multissh3-4.98/multiSSH3.egg-info → multissh3-4.99}/PKG-INFO +62 -30
- multissh3-4.98/PKG-INFO → multissh3-4.99/README.md +343 -327
- multissh3-4.98/README.md → multissh3-4.99/multiSSH3.egg-info/PKG-INFO +359 -311
- {multissh3-4.98 → multissh3-4.99}/multiSSH3.py +91 -24
- {multissh3-4.98 → multissh3-4.99}/setup.py +1 -1
- {multissh3-4.98 → multissh3-4.99}/LICENSE +0 -0
- {multissh3-4.98 → multissh3-4.99}/multiSSH3.egg-info/SOURCES.txt +0 -0
- {multissh3-4.98 → multissh3-4.99}/multiSSH3.egg-info/dependency_links.txt +0 -0
- {multissh3-4.98 → multissh3-4.99}/multiSSH3.egg-info/entry_points.txt +0 -0
- {multissh3-4.98 → multissh3-4.99}/multiSSH3.egg-info/requires.txt +0 -0
- {multissh3-4.98 → multissh3-4.99}/multiSSH3.egg-info/top_level.txt +0 -0
- {multissh3-4.98 → multissh3-4.99}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: multiSSH3
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.99
|
|
4
4
|
Summary: Run commands on multiple hosts via SSH
|
|
5
5
|
Home-page: https://github.com/yufei-pan/multiSSH3
|
|
6
6
|
Author: Yufei Pan
|
|
@@ -38,7 +38,7 @@ multissh will read a config file located at ```/etc/multiSSH3.config.json```
|
|
|
38
38
|
To store / generate a config file with the current command line options, you can use
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
|
-
mssh --
|
|
41
|
+
mssh --store_config_file
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
You can modify the json file directly after generation and multissh will read from it for loading defaults.
|
|
@@ -47,10 +47,14 @@ Note:
|
|
|
47
47
|
|
|
48
48
|
If you want to store password, it will be a plain text password in this config file. This will be better to supply it everytime as a CLI argument but you should really consider setting up priv-pub key setup.
|
|
49
49
|
|
|
50
|
+
Also Note:
|
|
51
|
+
|
|
52
|
+
On some systems, scp / rsync will require you use a priv-pub key to work
|
|
53
|
+
|
|
50
54
|
This option can also be used to store cli options into the config files. For example.
|
|
51
55
|
|
|
52
56
|
```bash
|
|
53
|
-
mssh --ipmi_interface_ip_prefix 192 --
|
|
57
|
+
mssh --ipmi_interface_ip_prefix 192 --store_config_file
|
|
54
58
|
```
|
|
55
59
|
will store
|
|
56
60
|
```json
|
|
@@ -64,6 +68,22 @@ DEFAULT_ENV_FILE = '/etc/profile.d/hosts.sh'
|
|
|
64
68
|
```
|
|
65
69
|
as hostname aliases.
|
|
66
70
|
|
|
71
|
+
multissh3 will resolve hostname grouping by:
|
|
72
|
+
ipv4 address expansion > local hostname resolution ( like /etc/hosts ) > currrent terminal environment > env from env_file > remote hostname resolution ( socket.gethostbyname() )
|
|
73
|
+
|
|
74
|
+
An example hostname alias file will look like:
|
|
75
|
+
```bash
|
|
76
|
+
us_east='100.100.0.1-3,us_east_prod_[1-5]'
|
|
77
|
+
us_central=""
|
|
78
|
+
us_west="100.101.0.1-2,us_west_prod_[a-c]_[1-3]"
|
|
79
|
+
us="$us_east,$us_central,$us_west"
|
|
80
|
+
asia="100.90.0-1,1-9"
|
|
81
|
+
eu=''
|
|
82
|
+
rhel8="$asia,$us_east"
|
|
83
|
+
all="$us,$asia,$eu"
|
|
84
|
+
```
|
|
85
|
+
( You can use bash replacements for grouping. )
|
|
86
|
+
|
|
67
87
|
For example:
|
|
68
88
|
```bash
|
|
69
89
|
export all='192.168.1-2.1-64'
|
|
@@ -104,61 +124,73 @@ While leaving minimum 40 characters / 1 line for each host display by default. Y
|
|
|
104
124
|
Use ```mssh --help``` for more info.
|
|
105
125
|
|
|
106
126
|
```bash
|
|
107
|
-
usage: mssh [-h] [-u USERNAME] [-
|
|
108
|
-
[-pre INTERFACE_IP_PREFIX] [-q] [-ww WINDOW_WIDTH] [-wh WINDOW_HEIGHT] [-sw] [-eo]
|
|
109
|
-
[--
|
|
110
|
-
|
|
127
|
+
usage: mssh [-h] [-u USERNAME] [-p PASSWORD] [-ea EXTRAARGS] [-11] [-f FILE] [-fs] [--scp] [-gm] [-t TIMEOUT] [-r REPEAT] [-i INTERVAL]
|
|
128
|
+
[--ipmi] [-mpre IPMI_INTERFACE_IP_PREFIX] [-pre INTERFACE_IP_PREFIX] [-q] [-ww WINDOW_WIDTH] [-wh WINDOW_HEIGHT] [-sw] [-eo]
|
|
129
|
+
[-no] [--no_env] [--env_file ENV_FILE] [-m MAX_CONNECTIONS] [-j] [--success_hosts] [-g] [-su] [-sh SKIP_HOSTS]
|
|
130
|
+
[--store_config_file] [--debug] [--copy-id] [-V]
|
|
131
|
+
[hosts] [commands ...]
|
|
111
132
|
|
|
112
|
-
Run a command on multiple hosts, Use #HOST# or #HOSTNAME# to replace the host name in the command
|
|
133
|
+
Run a command on multiple hosts, Use #HOST# or #HOSTNAME# to replace the host name in the command. Config file: /etc/multiSSH3.config.json
|
|
113
134
|
|
|
114
135
|
positional arguments:
|
|
115
|
-
hosts Hosts to run the command on, use "," to seperate hosts
|
|
116
|
-
commands the command to run on the hosts / the destination of the files #HOST# or #HOSTNAME# will be replaced with the host
|
|
136
|
+
hosts Hosts to run the command on, use "," to seperate hosts. (default: all)
|
|
137
|
+
commands the command to run on the hosts / the destination of the files #HOST# or #HOSTNAME# will be replaced with the host
|
|
138
|
+
name.
|
|
117
139
|
|
|
118
140
|
options:
|
|
119
141
|
-h, --help show this help message and exit
|
|
120
142
|
-u USERNAME, --username USERNAME
|
|
121
|
-
The general username to use to connect to the hosts. Will get overwrote by individual username@host if specified.
|
|
122
|
-
|
|
123
|
-
Extra arguments to pass to the ssh / rsync / scp command. Put in one string for multiple arguments.Use "=" ! Ex. -ea="--delete" (default:
|
|
124
|
-
None)
|
|
143
|
+
The general username to use to connect to the hosts. Will get overwrote by individual username@host if specified.
|
|
144
|
+
(default: None)
|
|
125
145
|
-p PASSWORD, --password PASSWORD
|
|
126
|
-
The password to use to connect to the hosts, (default:
|
|
146
|
+
The password to use to connect to the hosts, (default: )
|
|
147
|
+
-ea EXTRAARGS, --extraargs EXTRAARGS
|
|
148
|
+
Extra arguments to pass to the ssh / rsync / scp command. Put in one string for multiple arguments.Use "=" ! Ex.
|
|
149
|
+
-ea="--delete" (default: None)
|
|
127
150
|
-11, --oneonone Run one corresponding command on each host. (default: False)
|
|
128
151
|
-f FILE, --file FILE The file to be copied to the hosts. Use -f multiple times to copy multiple files
|
|
129
|
-
--file_sync
|
|
130
|
-
and destination will be the same in this mode. (default: False)
|
|
152
|
+
-fs, --file_sync Operate in file sync mode, sync path in <COMMANDS> from this machine to <HOSTS>. Treat --file <FILE> and
|
|
153
|
+
<COMMANDS> both as source as source and destination will be the same in this mode. (default: False)
|
|
131
154
|
--scp Use scp for copying files instead of rsync. Need to use this on windows. (default: False)
|
|
155
|
+
-gm, --gather_mode Gather files from the hosts instead of sending files to the hosts. Will send remote files specified in <FILE> to
|
|
156
|
+
local path specified in <COMMANDS> (default: False)
|
|
132
157
|
-t TIMEOUT, --timeout TIMEOUT
|
|
133
|
-
Timeout for each command in seconds (default:
|
|
158
|
+
Timeout for each command in seconds (default: 600 (disabled))
|
|
134
159
|
-r REPEAT, --repeat REPEAT
|
|
135
160
|
Repeat the command for a number of times (default: 1)
|
|
136
161
|
-i INTERVAL, --interval INTERVAL
|
|
137
162
|
Interval between repeats in seconds (default: 0)
|
|
138
163
|
--ipmi Use ipmitool to run the command. (default: False)
|
|
164
|
+
-mpre IPMI_INTERFACE_IP_PREFIX, --ipmi_interface_ip_prefix IPMI_INTERFACE_IP_PREFIX
|
|
165
|
+
The prefix of the IPMI interfaces (default: )
|
|
139
166
|
-pre INTERFACE_IP_PREFIX, --interface_ip_prefix INTERFACE_IP_PREFIX
|
|
140
167
|
The prefix of the for the interfaces (default: None)
|
|
141
|
-
-q,
|
|
168
|
+
-q, -nw, --nowatch, --quiet
|
|
169
|
+
Quiet mode, no curses watch, only print the output. (default: False)
|
|
142
170
|
-ww WINDOW_WIDTH, --window_width WINDOW_WIDTH
|
|
143
171
|
The minimum character length of the curses window. (default: 40)
|
|
144
172
|
-wh WINDOW_HEIGHT, --window_height WINDOW_HEIGHT
|
|
145
|
-
The minimum line height of the curses window. (default:
|
|
173
|
+
The minimum line height of the curses window. (default: 5)
|
|
146
174
|
-sw, --single_window Use a single window for all hosts. (default: False)
|
|
147
175
|
-eo, --error_only Only print the error output. (default: False)
|
|
148
|
-
-no, --
|
|
149
|
-
--no_env Do not load the environment variables. (default: False)
|
|
150
|
-
--env_file ENV_FILE The file to load the environment variables from. (default:
|
|
151
|
-
|
|
176
|
+
-no, --no_output Do not print the output. (default: False)
|
|
177
|
+
--no_env Do not load the command line environment variables. (default: False)
|
|
178
|
+
--env_file ENV_FILE The file to load the mssh file based environment variables from. ( Still work with --no_env ) (default:
|
|
179
|
+
/etc/profile.d/hosts.sh)
|
|
180
|
+
-m MAX_CONNECTIONS, --max_connections MAX_CONNECTIONS
|
|
152
181
|
Max number of connections to use (default: 4 * cpu_count)
|
|
153
182
|
-j, --json Output in json format. (default: False)
|
|
154
183
|
--success_hosts Output the hosts that succeeded in summary as wells. (default: False)
|
|
155
184
|
-g, --greppable Output in greppable format. (default: False)
|
|
156
|
-
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
185
|
+
-su, --skip_unreachable
|
|
186
|
+
Skip unreachable hosts while using --repeat. Note: Timedout Hosts are considered unreachable. Note: multiple
|
|
187
|
+
command sequence will still auto skip unreachable hosts. (default: False)
|
|
188
|
+
-sh SKIP_HOSTS, --skip_hosts SKIP_HOSTS
|
|
189
|
+
Skip the hosts in the list. (default: None)
|
|
190
|
+
--store_config_file Store / generate the default config file from command line argument and current config at
|
|
191
|
+
/etc/multiSSH3.config.json
|
|
192
|
+
--debug Print debug information
|
|
193
|
+
--copy-id Copy the ssh id to the hosts
|
|
162
194
|
-V, --version show program's version number and exit
|
|
163
195
|
```
|
|
164
196
|
|