Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

SSH into multiple hosts.

Project Description

SSH Multi v2.1.2. SSH into multiple machines at once.

Examples:

Get a count of processes on each server:

$ sshm example1.com,example2.com,example3.com,mail[01-05].example.com,host[01-25].org “ps aux | wc -l”

Check if postfix is running on mail servers:

$ sshm 192.168.0.1-5 “postfix status”

Verify which servers are accepting SSH connections:

$ sshm example[1-5,8].com “exit”

Copy a file to several servers (may not work for larger files):

$ cat some_file | sshm example[1-5].com “cat > some_file”

Specify a per-host port:

$ sshm example1.com:123,example2.com,example4.com:78 “exit”

Specify multiple groups of servers, the last positional argument is assumed to be the command.

$ sshm 192.168.0.1-20 example.com,mail[03-5].example.com “uptime”

Format the command per-host:

$ sshm example[1-3].com “echo {fqdn}”

Outputs:
sshm: example1.com(0): example1.com sshm: example2.com(0): example2.com sshm: example3.com(0): example3.com
Possible formatting variables:
uri, fqdn, subdomain, num

Quiet SSH’s error output (-q is passed to the SSH command):

$ sshm -u example.com “echo {subdomain}”

executes:
(ssh -q example.com echo example)

Any arguments not recognized by SSHM will be passed to ssh:

$ ssh example.com “ls” -o StrictHostKeyChecking=no

Attempt to get hostnames of the entire 10.0.0.0 subnet, do not store keys found, do not ask about keys found, do not prompt for password, timeout connection after 1 second, tell ssh to not display any error output. This command will take several days, and is not secure because all keys are ignored:

$ sshm -q 10.0-255.0-255.0-255 “hostname” -oUserKnownHostsFile=/dev/null -oStrictHostKeyChecking=no -oBatchMode=yes -oConnectTimeout=1
Release History

Release History

This version
History Node

2.1.2

History Node

2.0.2

History Node

2.0.1

History Node

2.0

History Node

1.5.1

History Node

1.5

History Node

1.4.1

History Node

1.4

History Node

1.3

History Node

1.2

History Node

1.1

History Node

1.0

History Node

0.8.7

History Node

0.8.6

History Node

0.8.5

History Node

0.8.3

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
sshm-2.1.2-py2.7.egg (17.5 kB) Copy SHA256 Checksum SHA256 2.7 Egg Aug 11, 2016
sshm-2.1.2-py3.2.egg (17.7 kB) Copy SHA256 Checksum SHA256 3.2 Egg Aug 11, 2016
sshm-2.1.2-py3.3.egg (17.8 kB) Copy SHA256 Checksum SHA256 3.3 Egg Aug 11, 2016
sshm-2.1.2-py3.4.egg (17.7 kB) Copy SHA256 Checksum SHA256 3.4 Egg Aug 11, 2016
sshm-2.1.2.tar.gz (7.7 kB) Copy SHA256 Checksum SHA256 Source Aug 11, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting