Skip to main content

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

Project details


Download files

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

Source Distribution

sshm-2.1.2.tar.gz (7.7 kB view details)

Uploaded Source

Built Distributions

sshm-2.1.2-py3.4.egg (17.7 kB view details)

Uploaded Source

sshm-2.1.2-py3.3.egg (17.8 kB view details)

Uploaded Source

sshm-2.1.2-py3.2.egg (17.7 kB view details)

Uploaded Source

sshm-2.1.2-py2.7.egg (17.5 kB view details)

Uploaded Source

File details

Details for the file sshm-2.1.2.tar.gz.

File metadata

  • Download URL: sshm-2.1.2.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for sshm-2.1.2.tar.gz
Algorithm Hash digest
SHA256 42929d2a995530d9cd927720217f8fe195f7f1a90077d117072f217512d65d42
MD5 d0e94388a34944d1ea0fb4644472b255
BLAKE2b-256 89a24d18a719ee22023cbc74ceac1811f7eb9b64479e9e9373a72dca1edd5e9d

See more details on using hashes here.

File details

Details for the file sshm-2.1.2-py3.4.egg.

File metadata

  • Download URL: sshm-2.1.2-py3.4.egg
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for sshm-2.1.2-py3.4.egg
Algorithm Hash digest
SHA256 e98ac52e52a3302ee1ceb9506c02af7fc67639cb4c1881607478910d01c3cbd5
MD5 b916c61913dfbd3059fb94d89c103005
BLAKE2b-256 9f367f2bdd134a22a63c290efdfa725a5fb94ee4a6b26a792cb4c501060648a3

See more details on using hashes here.

File details

Details for the file sshm-2.1.2-py3.3.egg.

File metadata

  • Download URL: sshm-2.1.2-py3.3.egg
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for sshm-2.1.2-py3.3.egg
Algorithm Hash digest
SHA256 0b1a944314316b4870dd5533e580374aaf9f4079a4d1f5c0bb776e6b832cab4e
MD5 48473e862fcbfbeec02b2eaa1a440a38
BLAKE2b-256 18f6fcafa28221e093e8cd51b7e23bb3dc3281f2605cbf8f786af3dad1db4edb

See more details on using hashes here.

File details

Details for the file sshm-2.1.2-py3.2.egg.

File metadata

  • Download URL: sshm-2.1.2-py3.2.egg
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for sshm-2.1.2-py3.2.egg
Algorithm Hash digest
SHA256 1f0ca0c196d48c73161d55f8ba0420d88474786195d154812c0e1aade0c70027
MD5 95fa70f17ef5f2ab92c5f46a04ad8aa2
BLAKE2b-256 a2223e9444764e1d5c64e2e1f20b3795cd0560f62fd6c8c3a20c1d6ea096ca08

See more details on using hashes here.

File details

Details for the file sshm-2.1.2-py2.7.egg.

File metadata

  • Download URL: sshm-2.1.2-py2.7.egg
  • Upload date:
  • Size: 17.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for sshm-2.1.2-py2.7.egg
Algorithm Hash digest
SHA256 9ca1ad3f1930195c793e5f7a7cdab409d804d0817ebc300e5172c5773be066f2
MD5 37ea23ef6be0e1c3a94dfe3470066475
BLAKE2b-256 45ea03f1299aadcdb23be677ea2094746b79413c6ede27d0c297215d09150e33

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page