NAME

mssh - Multi host ssh executer

VERSION

This documentation refers to mssh version 0.26.

SYNOPSIS

  mssh [ --VERSION | --help | --man ]
  mssh [-t|--test] [-v|--verbose] -h host [-h host2 ..] 'remote command'
  mssh [-t|--test] [-v|--verbose] host [host2 ...] 'remote command'
  mssh [-t|--test] [-v|--verbose] [-c|--cssh|-m|--tmux|-n|--tmux-nested] -h host [-h host2 ..]

OPTIONS:
 'remote command'
               The command to execute on the remote hosts.
 host          See --host, only use if specifying a remote command

 -h --host[=]str
               Host or range of hosts to execute 'remote command' on
               The range must be sourounded by [] and can be either comma
               seperated integer/letters or .. for a range of all values
               from the first to last. Note if clusterssh (cssh) is
               installed and no 'remote command' specified C<cssh> will
               be run, similarly if tmux is installed.
               EG [0..5] for 1,2,3,4 and 5
                  [0,5]      1 and 5
                  [0..3,5]   1,2,3 and 5
                  [0-5]      1,2,3,4 and 5
                  [0-3,5]    1,2,3 and 5
                  {0..5} for 1,2,3,4 and 5
                  {0,5}      1 and 5
                  {0..3,5}   1,2,3 and 5
                  {0-5}      1,2,3,4 and 5
                  {0-3,5}    1,2,3 and 5
 -g --group[=]name
               Specify a host name group from your ~/.mssh file. (see --man
               for more details)
 -p --parallel[=]int
               Fork calls to each server to run in parallel the value limits
               the number of processes called at once.
               Note without --interleave you wont see results until the each
               server has completed so that results are groupped.
 -i --interleave
               When running parallel commands interleave the output of each host
    --no-interleave
               Turn off --fork interleaving of output (the default)
 -t --test     Just show all the commands that would be run don't actually
               run anything
 -f --fork     Fork the ssh processes so they run in parallel, output may
               not be legible. (Equivalent of --parallel=4 --interleave)
 -s --script[=]str
               Hmmm what's this
 -c --cssh     Use cssh to run the ssh commands
    --cssh-cmd[=]str
               Use str as the C<cssh> program (defaults to cssh found in $PATH)
 -m --tmux     Create a tmux session with each window pane connecting to a host
    --tmux-cmd[=]str
               Use str as the C<tmux> program (defaults to tmux found in $PATH)
 -n --tmux-nested
               Use this fag when running in an existing tmux session to split up
               the current tmux window in the same fashion as running a sepperate
               tmux session.
    --tmux-sync
    --sync     Turn on TMUX synchronize pages
    --no-sync  Turn off TMUX synchronize pages (Default)
 -o --only-hosts
               No command passed (all arguments are hosts)

 -v --verbose  Show more detailed option
    --VERSION  Prints the version information
    --help     Prints this help information
    --man      Prints the full documentation for mssh

DESCRIPTION

Groups

You can configure host name groups in ~/.mssh (a YAML formatted file)

---
groups:
    prod: myhost0[1-9].prod
    dev:
        - myhost0[1-4].dev
        - myhost0[1-4].test

This can save some effort with commonly used groups of hosts. The argument --group adds any configured hosts to any specified host names.

SUBROUTINES/METHODS

DIAGNOSTICS

CONFIGURATION AND ENVIRONMENT

DEPENDENCIES

INCOMPATIBILITIES

BUGS AND LIMITATIONS

There are no known bugs in this module.

Please report problems to Ivan Wills (ivan.wills@gmail.com).

Patches are welcome.

AUTHOR

Ivan Wills - (ivan.wills@gmail.com)

LICENSE AND COPYRIGHT

Copyright (c) 2012 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW 2077). All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.