multiSSH3 4.76__py3-none-any.whl → 4.83__py3-none-any.whl

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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: multiSSH3
3
- Version: 4.76
3
+ Version: 4.83
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
@@ -19,6 +19,45 @@ A script that is able to issue commands to multiple hosts while monitoring their
19
19
  Can be used in bash scripts for automation actions.
20
20
  Also able to be imported and / or use with Flexec SSH Backend to perform cluster automation actions.
21
21
 
22
+ Install via
23
+ ```
24
+ pip install multiSSH3
25
+ ```
26
+
27
+ multiSSH3 will be available as
28
+ ```
29
+ mssh
30
+ mssh3
31
+ multissh
32
+ multissh3
33
+ multiSSH3
34
+ ```
35
+
36
+ multissh will read a config file located at ```/etc/multiSSH3.config.json```
37
+
38
+ To store / generate a config file with the current command line options, you can use
39
+
40
+ ```
41
+ mssh --generate_default_config_file
42
+ ```
43
+
44
+ You can modify the json file directly after generation and multissh will read from it for loading defaults.
45
+
46
+ Note:
47
+
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
+
50
+ This option can also be used to store cli options into the config files. For example.
51
+
52
+ ```
53
+ mssh --ipmi_interface_ip_prefix 192 --generate_default_config_file
54
+ ```
55
+ will store
56
+ ```
57
+ "DEFAULT_IPMI_INTERFACE_IP_PREFIX": "192"
58
+ ```
59
+ into the json file.
60
+
22
61
  By defualt reads bash env variables for hostname aliases. Also able to read
23
62
  ```
24
63
  DEFAULT_ENV_FILE = '/etc/profile.d/hosts.sh'
@@ -28,20 +67,20 @@ as hostname aliases.
28
67
  For example:
29
68
  ```
30
69
  export all='192.168.1-2.1-64'
31
- multiSSH3.py all 'echo hi'
70
+ mssh all 'echo hi'
32
71
  ```
33
72
 
34
73
  It is also able to recognize ip blocks / number blocks / hex blocks / character blocks directly.
35
74
 
36
75
  For example:
37
76
  ```
38
- multiSSH3.py testrig[1-10] lsblk
39
- multiSSH3.py ww[a-c],10.100.0.* 'cat /etc/fstab' 'sed -i "/lustre/d' /etc/fstab' 'cat /etc/fstab'
77
+ mssh testrig[1-10] lsblk
78
+ mssh ww[a-c],10.100.0.* 'cat /etc/fstab' 'sed -i "/lustre/d' /etc/fstab' 'cat /etc/fstab'
40
79
  ```
41
80
 
42
81
  It also supports interactive inputs. ( and able to async boardcast to all supplied hosts )
43
82
  ```
44
- multiSSH3.py www bash
83
+ mssh www bash
45
84
  ```
46
85
 
47
86
  By default, it will try to fit everything inside your window.
@@ -52,7 +91,7 @@ DEFAULT_CURSES_MINIMUM_LINE_LEN = 1
52
91
  While leaving minimum 40 characters / 1 line for each host display by default. You can modify this by using -ww and -wh.
53
92
 
54
93
 
55
- Use ```multiSSH3.py --help``` for more info.
94
+ Use ```mssh --help``` for more info.
56
95
 
57
96
  ```
58
97
  usage: mssh [-h] [-u USERNAME] [-ea EXTRAARGS] [-p PASSWORD] [-11] [-f FILE] [--file_sync] [--scp] [-t TIMEOUT] [-r REPEAT] [-i INTERVAL] [--ipmi]
@@ -121,23 +160,24 @@ Following document is generated courtesy of Mr.ChatGPT-o1 Preview:
121
160
 
122
161
  ## Table of Contents
123
162
 
124
- - [Features](#features)
125
- - [Installation](#installation)
126
- - [Usage](#usage)
127
- - [Basic Syntax](#basic-syntax)
128
- - [Command-Line Options](#command-line-options)
129
- - [Examples](#examples)
130
- - [Running a Command on Multiple Hosts](#running-a-command-on-multiple-hosts)
131
- - [Copying Files to Multiple Hosts](#copying-files-to-multiple-hosts)
132
- - [Using Hostname Ranges](#using-hostname-ranges)
133
- - [Using IPMI](#using-ipmi)
134
- - [Using Password Authentication](#using-password-authentication)
135
- - [Skipping Unreachable Hosts](#skipping-unreachable-hosts)
136
- - [JSON Output](#json-output)
137
- - [Quiet Mode](#quiet-mode)
138
- - [Environment Variables](#environment-variables)
139
- - [Notes](#notes)
140
- - [License](#license)
163
+ - [multiSSH3](#multissh3)
164
+ - [multissh](#multissh)
165
+ - [Table of Contents](#table-of-contents)
166
+ - [Features](#features)
167
+ - [Basic Syntax](#basic-syntax)
168
+ - [Command-Line Options](#command-line-options)
169
+ - [Examples](#examples)
170
+ - [Running a Command on Multiple Hosts](#running-a-command-on-multiple-hosts)
171
+ - [Copying Files to Multiple Hosts](#copying-files-to-multiple-hosts)
172
+ - [Using Hostname Ranges](#using-hostname-ranges)
173
+ - [Using IPMI](#using-ipmi)
174
+ - [Using Password Authentication](#using-password-authentication)
175
+ - [Skipping Unreachable Hosts](#skipping-unreachable-hosts)
176
+ - [JSON Output](#json-output)
177
+ - [Quiet Mode](#quiet-mode)
178
+ - [Environment Variables](#environment-variables)
179
+ - [Notes](#notes)
180
+ - [License](#license)
141
181
 
142
182
  ## Features
143
183
 
@@ -152,36 +192,10 @@ Following document is generated courtesy of Mr.ChatGPT-o1 Preview:
152
192
  - **Interactive Mode**: Run interactive commands with curses-based UI for monitoring.
153
193
  - **Quiet Mode**: Suppress output for cleaner automation scripts.
154
194
 
155
- ## Installation
156
-
157
- 1. **Clone the Repository**
158
-
159
- ```bash
160
- git clone https://github.com/yourusername/multissh.git
161
- ```
162
-
163
- 2. **Navigate to the Directory**
164
-
165
- ```bash
166
- cd multissh
167
- ```
168
-
169
- 3. **Make the Script Executable**
170
-
171
- ```bash
172
- chmod +x multissh.py
173
- ```
174
-
175
- 4. **Install Dependencies**
176
-
177
- Ensure you have Python 3 and the required modules installed. You may need to install `curses` and `ipaddress` modules if they are not already available.
178
-
179
- ## Usage
180
-
181
195
  ### Basic Syntax
182
196
 
183
197
  ```bash
184
- ./multissh.py [options] <hosts> <commands>
198
+ mssh [options] <hosts> <commands>
185
199
  ```
186
200
 
187
201
  - `<hosts>`: Comma-separated list of target hosts. Supports ranges and wildcards.
@@ -225,7 +239,7 @@ Following document is generated courtesy of Mr.ChatGPT-o1 Preview:
225
239
  ### Running a Command on Multiple Hosts
226
240
 
227
241
  ```bash
228
- ./multissh.py "host1,host2,host3" "uptime"
242
+ mssh "host1,host2,host3" "uptime"
229
243
  ```
230
244
 
231
245
  This command runs `uptime` on `host1`, `host2`, and `host3`.
@@ -233,7 +247,7 @@ This command runs `uptime` on `host1`, `host2`, and `host3`.
233
247
  ### Copying Files to Multiple Hosts
234
248
 
235
249
  ```bash
236
- ./multissh.py -f "/path/to/local/file.txt" "host1,host2,host3" "/remote/path/"
250
+ mssh -f "/path/to/local/file.txt" "host1,host2,host3" "/remote/path/"
237
251
  ```
238
252
 
239
253
  This command copies `file.txt` to `/remote/path/` on the specified hosts.
@@ -241,7 +255,7 @@ This command copies `file.txt` to `/remote/path/` on the specified hosts.
241
255
  ### Using Hostname Ranges
242
256
 
243
257
  ```bash
244
- ./multissh.py "host[01-05]" "hostname"
258
+ mssh "host[01-05]" "hostname"
245
259
  ```
246
260
 
247
261
  This expands to `host01`, `host02`, `host03`, `host04`, `host05` and runs `hostname` on each.
@@ -249,7 +263,7 @@ This expands to `host01`, `host02`, `host03`, `host04`, `host05` and runs `hostn
249
263
  ### Using IPMI
250
264
 
251
265
  ```bash
252
- ./multissh.py --ipmi "192.168.1.[100-105]" "chassis power status"
266
+ mssh --ipmi "192.168.1.[100-105]" "chassis power status"
253
267
  ```
254
268
 
255
269
  Runs `ipmitool chassis power status` on the specified IPMI interfaces.
@@ -257,7 +271,7 @@ Runs `ipmitool chassis power status` on the specified IPMI interfaces.
257
271
  ### Using Password Authentication
258
272
 
259
273
  ```bash
260
- ./multissh.py -p "yourpassword" "host1,host2" "whoami"
274
+ mssh -p "yourpassword" "host1,host2" "whoami"
261
275
  ```
262
276
 
263
277
  Uses `sshpass` to provide the password for SSH authentication.
@@ -265,7 +279,7 @@ Uses `sshpass` to provide the password for SSH authentication.
265
279
  ### Skipping Unreachable Hosts
266
280
 
267
281
  ```bash
268
- ./multissh.py -su "host1,host2,host3" "date"
282
+ mssh -su "host1,host2,host3" "date"
269
283
  ```
270
284
 
271
285
  Skips hosts that are unreachable during execution.
@@ -273,7 +287,7 @@ Skips hosts that are unreachable during execution.
273
287
  ### JSON Output
274
288
 
275
289
  ```bash
276
- ./multissh.py -j "host1,host2" "uname -a"
290
+ mssh -j "host1,host2" "uname -a"
277
291
  ```
278
292
 
279
293
  Outputs the results in JSON format, suitable for parsing.
@@ -281,7 +295,7 @@ Outputs the results in JSON format, suitable for parsing.
281
295
  ### Quiet Mode
282
296
 
283
297
  ```bash
284
- ./multissh.py -q "host1,host2" "ls /nonexistent"
298
+ mssh -q "host1,host2" "ls /nonexistent"
285
299
  ```
286
300
 
287
301
  Suppresses all output, useful for scripts where you only care about exit codes.
@@ -0,0 +1,7 @@
1
+ multiSSH3.py,sha256=1Un4-afx2wCyXWKgy1-Y55fpth0_L8zdb-qa_Cm3U-s,85689
2
+ multiSSH3-4.83.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
3
+ multiSSH3-4.83.dist-info/METADATA,sha256=A3OVJ44Q0Oi8_1na-AredxReylobi6DX2m87o1z7-4s,15887
4
+ multiSSH3-4.83.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
5
+ multiSSH3-4.83.dist-info/entry_points.txt,sha256=xi2rWWNfmHx6gS8Mmx0rZL2KZz6XWBYP3DWBpWAnnZ0,143
6
+ multiSSH3-4.83.dist-info/top_level.txt,sha256=tUwttxlnpLkZorSsroIprNo41lYSxjd2ASuL8-EJIJw,10
7
+ multiSSH3-4.83.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (74.1.2)
2
+ Generator: setuptools (75.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5