Browse Source

documentation :D

Graham Northup 6 years ago
Signed by: grissess GPG Key ID: 5D000E6F539376FB
  1. 22


@ -0,0 +1,22 @@
# itl_batch
## a silly script for doing batch work across machines
- `sshpass`
- `ssh`
1. Edit `` to reflect what you want to run.
2. Ensure `all_addrs` has all potential addresses of all machines (usually an entire DHCP range)
3. Run `./` with two arguments: the username, and the password.
4. Profit!
Output to stdout is sent to your terminal, but output to stderr (containing a majority of connection refused messages) is instead appended to the file `/tmp/batch_errors`. If you're looking for other things routed to stderr (like legitimate errors from commands), tail that file in another terminal.
This distribution's `all_addrs` is meant to be used within the labs, and so includes our entire 128.153.144/23. It does not yet support 128.153.146/24. Similarly, the port is forced to 13699 in ``, which may need to be configured for general use.
Note that `` invokes `ssh` via `sshpass`, and so respects your local configuration, including SSH keys. Note that *it writes to known_hosts* as per defaults, so if machines change around, there may be some rejections on host identity changes. You will see these in the regular error stream, `/tmp/batch_errors`; if it happens, edit your `known_hosts` file as usual (might I recommend shift+V, d?).
`all_addrs` usually contains IP addresses, but may also contain hostnames, or, really, anything acceptable past '@' in your version of ssh.
Please don't use password authentication with secure passwords on machines that others use. Anyone with access to `top` can see the password in the cmdline of `sshpass`!