Trigger has a bundled tool called "run_cmds" that does exactly this. It can SSH/telnet to any number of devices that you specify and run any commands you specify!
$ run_cmds -h
Usage: run_cmds [options]
Run commands on network devices.
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-d DEVICES, --devices=DEVICES
Comma-separated list of devices.
-c CONFIG, --config=CONFIG
Comma-separated list of config statements. If your
commands have spaces, either enclose the command in "
or escape the spaces with \
-D DEVICE_FILE, --device-file=DEVICE_FILE
Specify file with list of devices.
-C CONFIG_FILE, --config-file=CONFIG_FILE
Specify file with list of config statements. The file
MUST be in a tftp directory (/home/tftp/<subdir>). The
fully-qualified path MUST be specified in the
argument. Do NOT include "conf t" or "wr mem" in your
file. ** If both -c and -C options specified, then -c
will execute first, followed by -C
-p DEVICE_PATH, --device-path=DEVICE_PATH
Specify dir with a file named for each device.
Contents of each file must be list of commands. that
you want to run for the device that shares its name
with the file. ** May NOT be used with -d,-c,-D,-C **
-q, --quiet suppress all standard output; errors/warnings still
display.
-j JOBS, --jobs=JOBS maximum simultaneous connections (default 5).
-t TIMEOUT, --timeout=TIMEOUT
Time in seconds to wait for each command to
complete (default 30).
-v, --verbose verbose output.
-V, --debug debug output.
--push actually do stuff. Default is False.