"Fossies" - the Fresh Open Source Software Archive

Member "mussh/README" (25 Oct 2011, 5843 Bytes) of package /linux/privat/old/mussh-1.0.tgz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 mussh - MUltihost SSH 
    2 
    3 $Id: README,v 1.7 2005/08/24 00:34:31 doughnut Exp $
    4 
    5 =====================
    6 Mussh is a shell script that allows you to execute a command or script
    7 over ssh on multiple hosts with one command. When possible mussh will use 
    8 ssh-agent and RSA/DSA keys to minimize the need to enter your password 
    9 more than once.
   10 
   11 
   12 Requirements
   13 ============
   14 General:
   15 - ssh with ssh-agent
   16 When Proxying:
   17 - Proxy server must have OpenSSH 2.3 or greater, or an sshd that works with
   18   ForwardAgent under ssh2.
   19 - Proxy server must have mussh installed in your PATH.  To verify that it
   20   is in your path use "ssh user@proxy 'which mussh'". 
   21   Use "ssh user@proxy 'echo $PATH'" to determine what your path is.
   22 
   23 License
   24 =======
   25 GPL
   26 
   27 
   28 Compatibility
   29 ============
   30 I wrote and tested this on Mandrake 8.x, Redhat 7.x, RedHat Enterprise
   31 (2.1,3,4), and Fedora Core (3,4,5).  Other than that, it needs more testing!
   32 If you get this to run _anywhere_ else, email me at doughnut@doughnut.net.
   33 
   34 
   35 Interaction with ssh-agent
   36 ==========================
   37 Assuming that you're not turning off the agent with '-A' mussh will attempt
   38 to use ssh-agent.  Normally mussh will get rid of the agent when it exits.
   39 See EXAMPLES for examples.
   40 
   41 
   42 Usage
   43 =====
   44 mussh [OPTIONS] <HOST ARGS> <COMMAND ARGS>
   45 
   46 Arguments can be in any order.
   47 
   48 OPTIONS:
   49 	--help          This gives a brief help message.
   50 	
   51 	-d              see -d1
   52 
   53 	-d 0            Turns debug mode off.
   54 
   55 	-d 1            On STDERR prints out basic actions and ssh-agent
   56 	                activity and which host is being connected to.
   57 
   58 	-d 2            Includes all of the output from -d1, the list of 
   59 			hosts and the command/script as it will be
   60 			executed on each host.
   61 
   62 	-v		see -v1
   63 
   64 	-v 1            Sets ssh in debug1 mode by passing "-v" to ssh.
   65 			
   66 	-v 2            Sets ssh in debug2 mode by passing "-v -v" to ssh.
   67 			
   68 	-v 3            Sets ssh in debug3 mode by passing "-v -v -v" to ssh.
   69 
   70 	-m [n]          Run concurrently on 'n' hosts at a time (async).
   71 			Use '0' (zero) for infinite. (default if -m)
   72 
   73 			
   74 	-q              No output unless necessary.
   75 	                This will cancel -d and -v if after them on
   76 			the command line.  It also suppresses the output
   77 			of each host.  This will NOT suppress the
   78 			password/passphrase prompts required to log 
   79 			into each host.
   80 
   81 	-P              Do NOT fall back to passwords on any host.  This will
   82                         skip hosts where keys fail.  If you use this with
   83 			'-d' you'll still see which hosts failed.
   84 			
   85 	-i <identity> [identity ..]
   86 	                Load an identity file.  
   87 	                When -i is used, the specified identity file(s) is
   88 			loaded instead of the default identity.  You can
   89 			load as many RSA/DSA identities as you'd like.
   90 			
   91 	-o <ssh-args>   Args to pass to ssh with -o option.  See the
   92 	                ssh(1) man page for more info on the -o option.
   93 
   94 	-a              Force loading ssh-agent.
   95 	                Without this flag, mussh will not load another 
   96 			agent when one is already loaded.
   97 			
   98 	-A              Do NOT load ssh-agent.
   99 	                If no agent is loaded you will be prompted for a
  100 			password or passphrase by ssh for each host.  If
  101 			you do not have RSA/DSA keys for the destination
  102 			hosts, this will save you some hassle.
  103 
  104 	-b              Print each hosts' output in a block without mingling
  105 			with other hosts' output.
  106 	-B              Allow hosts' output to mingle. (default)
  107 
  108 
  109 	-l <login>      Use 'login' when no other is specified with hostname.
  110 	-L <login>      Force use of 'login' name on all hosts.  These can be
  111 	                handy for adding 'root@' to hostnames kept in a file
  112 			for -H option.  With -h it means you get to type less.
  113 			
  114 	-u              Unique.  Eliminate duplicate hosts (default).
  115 	                If you a host or user@host occurs more than
  116 			once across files specified with -H or hosts
  117 			specified with -h, the host or user@host is used
  118 			only once.
  119 			
  120 	-U              Do NOT make host list unique.
  121 	                This simply overrides the -u flag.  This will
  122 			cause scripts to be executed on duplicate hosts
  123 			once per listing.
  124 
  125 	-s <shell>      Path to shell on remote host. (Default: bash)
  126 			This will allow you to run commands in a shell other
  127 			than bash.  Sorry but one had to be specified.
  128 
  129 	-t <secs>	Timeout setting for each session.
  130                         (requires openssh 3.8 or newer)
  131 
  132 	-V              Print version info and exit.
  133 
  134 	
  135 	
  136 HOST ARGS:
  137 	-h [user@]<host> [[user@]<host> ..]
  138 	                As with ssh itself, the username can be 
  139 			supplied for a host but is not required.
  140 			
  141 	-H <file> [file ..]
  142 	                Add contents of file(s) to list of hosts.
  143 			Files should have one host per line.  Use
  144 			"#" for comments.
  145 			
  146 COMMAND ARGS:
  147 	-c <command>    Add a command or quoted list of commands and
  148 	                args to list of commands to be executed on
  149 			each host.  May be used more than once.
  150 
  151 	-C <file> [file ..]
  152 	                Add file contents to list of commands to be
  153 	                executed on each host.  May be used more
  154 	                than once.
  155 
  156 At least one host is required.  Arguments are in no particular order.
  157 
  158 
  159 Tips
  160 ====
  161  -  To pipe commands to mussh, you can get the commands from standard 
  162     input by using '-C -'.
  163  -  To pipe hosts to mussh, you can get the hosts from standard input
  164     by using '-H -'.
  165  -  When you already have an ssh-agent loaded, you can avoid loading
  166     sensitive keys into that agent by using '-a' to force mussh
  167     to load (and dispose of) it's own agent.
  168  -  When mussh is running you can use CTRL-\ to view which hosts are 
  169     currently running and which hosts remain.
  170  -  Blocking (-b) in asynchronous mode (-m) only makes the output look
  171     serial.  The commands are still running at the same time on the
  172     remote host.
  173