1MUSSH(1)                         MUltihost SSH                        MUSSH(1)
2
3
4

NAME

6       mussh - MUltihost SSH
7

SYNOPSIS

9       mussh [ OPTIONS ] <-h host...  | -H hostfile > [-c cmd ] [-C scriptfile
10       ]
11

DESCRIPTION

13       mussh is a shell script that allows you to execute a command or  script
14       over  ssh(1)  on  multiple  hosts with one command. When possible mussh
15       will use ssh-agent(1) and RSA/DSA keys to minimize the  need  to  enter
16       your password more than once.
17

OPTIONS

19       --help Prints full help text.
20
21       -d     Same as -d 1
22
23       -d 0   Turns debug mode off.
24
25       -d 1   On  STDERR  prints  out basic actions and ssh-agent activity and
26              which host is being connected to.
27
28       -d 2   Includes all of the output from -d1, the list of hosts, the com‐
29              mand/script as it will be executed on each host, and a lot more.
30
31       -v     Same as -v 1
32
33       -v 1   Sets ssh in debug1 mode by passing "-v" to ssh.
34
35       -v 2   Sets ssh in debug2 mode by passing "-v -v" to ssh.
36
37       -v 3   Sets ssh in debug3 mode by passing "-v -v -v" to ssh.
38
39       -m [n] Run concurrently on 'n' hosts at a time (asynchronous).  Use '0'
40              (zero) for infinite. (default)
41
42       -q     No output unless necessary.  This will cancel -d and -v if after
43              them on the command line.  It also suppresses the output of each
44              host.  This will NOT suppress  the  password/passphrase  prompts
45              required to log into each host.
46
47       -i <identity> [identity ..]
48              Load  an identity file.  When -i is used, the specified identity
49              file(s) is loaded instead of the default identity.  You can load
50              as many RSA/DSA identities as you'd like.
51
52       -o <ssh-args>
53              Args to pass to ssh with -o option.  See the ssh(1) man page for
54              more info on the -o option.
55
56       -a     Force loading ssh-agent.  Without this flag, mussh will not load
57              another agent when one is already loaded.
58
59       -A     Do  NOT  load  ssh-agent.   If  no  agent  is loaded you will be
60              prompted for a password or passphrase by ssh for each host.   If
61              you  do  not  have  RSA/DSA keys for the destination hosts, this
62              will save you some hassle.
63
64       -b     Print each hosts' output in a block without mingling with  other
65              hosts' output.
66
67       -B     Allow hosts' output to mingle. (default)
68
69       -u     Unique.   Eliminate  duplicate hosts. (default) If you a host or
70              user@host occurs more than once across files specified  with  -H
71              or  hosts  specified with -h, the host or user@host is used only
72              once.
73
74       -U     Do NOT make host list unique.   This  simply  overrides  the  -u
75              flag.  This will cause scripts to be executed on duplicate hosts
76              once per listing.
77
78       -P     Do NOT fall back to passwords on any host.  This will skip hosts
79              where keys fail.  If you use this with
80
81       -l <login>
82              Use 'login' when no other is specified with hostname.
83
84       -L <login>
85              Force  use of 'login' name on all hosts.  These can be handy for
86              adding 'root@' to hostnames kept in a file for -H option.   With
87              -h it means you get to type less.
88
89       -s <shell>
90              Path to shell on remote host. (Default: bash)
91
92       -t <secs>
93              Timeout  setting  for  each  session.   (requires openssh 3.8 or
94              newer)
95
96       -V     Print version info and exit.
97

PROXY ARGS

99       -p [user@]<host>
100              Host to use as proxy.  (Must have mussh installed)
101
102       -po <ssh-args>
103              Args to pass to ssh on proxy with -o option.
104

HOST ARGS

106       -h [user@]<host> [[user@]<host> ..]
107              Add a host to list of hosts.  May be used more than once.
108
109       -H <file> [file ..]
110              Add contents of file(s) to list of hosts.  Files should have one
111              host per line.  Use "#" for comments.
112

COMMAND ARGS

114       If neither is specified, commands will be read from standard input.
115
116       -c <command>
117              Add  a  command  or  quoted list of commands and args to list of
118              commands to be executed on each host.  May  be  used  more  than
119              once.
120
121       -C <file> [file ..]
122              Add  file  contents  to  list of commands to be executed on each
123              host.  May be used more than once.
124

PROXY MODE

126       When proxying, mussh can use a single remote server  to  as  a  bastion
127       host.  All hosts will be connected to from the central host rather than
128       from the computer where you are initially running mussh.  This  can  be
129       handy when you only have access to one machine behind a firewall.
130
131       The  proxy host must have OpenSSH 2.3 or greater, or an sshd that works
132       with ForwardAgent under  ssh2.   Proxy  server  must  also  have  mussh
133       installed  in  your  PATH.   To verify that it is in your path use "ssh
134       user@proxy 'which mussh'".  Use "ssh user@proxy 'echo $PATH'" to deter‐
135       mine what your path is.
136

SSH-AGENT INTERACTION

138       Assuming  that  you're  not  turning off the agent with '-A' mussh will
139       attempt to use ssh-agent(1).  Normally mussh will get rid of the  agent
140       when it exits.  See EXAMPLES for examples.
141

EXAMPLES

143       There is an EXAMPLES file with detailed examples.
144
145
146       The basic command:
147              $ mussh -h foo bar baz
148
149
150       A simple command:
151              $ mussh -h foo bar baz -c 'rpm -e emacs'
152
153
154       A simple command asynchronously:
155              $ mussh -h foo bar baz -c 'rpm -e emacs' -m
156
157
158       Using a specific key:
159              $ mussh -h foo bar baz -c 'rpm -e emacs' -i ~/.ssh/my_other.key
160
161
162       Loading a list of hosts from a file:
163              $ mussh -H /tmp/hostlist.txt -c 'rpm -e emacs'
164
165
166       Loading a script from a file:
167              $ mussh -h foo bar baz -C /tmp/scriptfile.sh
168
169

BUGS

171       Please report any bugs at http://sourceforge.net/projects/mussh/
172

AUTHOR

174       Dave Fogarty <doughnut at doughnut dot net>
175

SEE ALSO

177       ssh(1), ssh-agent(1)
178
179
180
181Doughnut                          August 2005                         MUSSH(1)
Impressum