"Fossies" - the Fresh Open Source Software Archive

Member "mussh/EXAMPLES" (30 Jul 2009, 4004 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 	SITUATION A (using ssh-agent):
    2 	You run mussh and ssh-agent loads your default rsa/dsa key.  You
    3 	are prompted for your passphrase, you enter it, mussh executes
    4 	the commands, kills ssh-agent, and exits.
    5 
    6 [doughnut@extradot doughnut]$ mussh -h swing slide junglegym -c 'rpm -q emacs'
    7 Need passphrase for /home/doughnut/.ssh/identity
    8 Enter passphrase for doughnut@extradot.yourdomain.com:
    9 Identity added: /home/doughnut/.ssh/identity (doughnut@extradot.yourdomain.com)
   10  
   11 junglegym: package emacs is not installed
   12 slide: package emacs is not installed
   13 swing: package emacs is not installed
   14 
   15 
   16 
   17 
   18 	SITUATION B (using passwords):
   19 	You run mussh but don't have RSA/DSA keys set up.  When mussh connects
   20 	to each host, it prompts you for the password.  After completing 
   21 	the last host, mussh exits.
   22 
   23 [doughnut@extradot doughnut]$ mussh -h swing slide junglegym -c 'rpm -q emacs'
   24 /home/doughnut/.ssh/identity: No such file or directory
   25  
   26 doughnut@junglegym's password:
   27 junglegym: package emacs is not installed
   28 doughnut@slide's password:
   29 slide: package emacs is not installed
   30 doughnut@swing's password:
   31 swing: package emacs is not installed
   32 
   33 
   34 
   35 
   36 
   37 	SITUATION C (ssh-agent already running):
   38 	If you are already running ssh-agent with the keys loaded, mussh 
   39 	will not load keys unless you tell it to with the -i flag.
   40 
   41 [doughnut@extradot doughnut]$ mussh -h swing slide junglegym -c 'rpm -q emacs'
   42  
   43 junglegym: package emacs is not installed
   44 slide: package emacs is not installed
   45 swing: package emacs is not installed
   46 
   47 
   48 
   49 
   50 
   51 	SITUATION D (everything but a goat):
   52 	This example uses almost everything you could.  Specifying hosts
   53 	on the command line AND in a file with comments and blank lines, 
   54 	executing commands from the command line and from a file, forcing
   55 	a unique agent to be loaded, using multiple keys (both RSA and DSA),
   56 	and turing debug mode on for verbose output.
   57 
   58 [doughnut@extradot doughnut]$ cat dev/spfiles/testhosts
   59 dave@hobo
   60 #test@testhost
   61 
   62 merrygoround
   63 [doughnut@extradot doughnut]$ cat dev/spfiles/testscript
   64 date
   65 uptime
   66 
   67 [doughnut@extradot doughnut]$ mussh -a -i $HOME/.ssh/identity $HOME/.ssh/id_dsa -d -h swing slide -H dev/spfiles/testhosts -h junglegym -c 'rpm -q emacs' -C dev/spfiles/testscript
   68 DEBUG: Starting Agent
   69 DEBUG: Forcing SSH Agent
   70 DEBUG: Adding Keys
   71 Need passphrase for /home/doughnut/.ssh/identity
   72 Enter passphrase for doughnut@extradot.yourdomain.com:
   73 Identity added: /home/doughnut/.ssh/identity (doughnut@extradot.yourdomain.com)
   74 Need passphrase for /home/doughnut/.ssh/id_dsa
   75 Enter passphrase for /home/doughnut/.ssh/id_dsa:
   76 Bad passphrase, try again:
   77 Identity added: /home/doughnut/.ssh/id_dsa (/home/doughnut/.ssh/id_dsa)
   78 
   79 DEBUG: CONNECT junglegym
   80 junglegym: Wed Jun 27 18:34:37 PDT 2001
   81 junglegym:   6:34pm  up 19 days, 18:46,  1 user,  load average: 0.00, 0.00, 0.00
   82 junglegym: package emacs is not installed
   83 DEBUG: CONNECT dave@hobo
   84 dave@hobo: Wed Jun 27 18:35:35 PDT 2001
   85 dave@hobo:   6:35pm  up 20 days, 19:54, 11 users,  load average: 0.00, 0.00, 0.00
   86 dave@hobo: package emacs is not installed
   87 DEBUG: CONNECT merrygoround
   88 merrygoround: Wed Jun 27 18:35:27 PDT 2001
   89 merrygoround:   6:35pm  up 20 days, 19:53,  1 user,  load average: 0.22, 0.11, 0.03
   90 merrygoround: emacs-20.5-7
   91 DEBUG: CONNECT slide
   92 slide: Wed Jun 27 18:35:32 PDT 2001
   93 slide:   6:35pm  up 19 days, 17:40,  4 users,  load average: 0.00, 0.00, 0.00
   94 slide: package emacs is not installed
   95 DEBUG: CONNECT swing
   96 swing: Wed Jun 27 18:36:15 PDT 2001
   97 swing:   6:36pm  up 20 days, 19:54,  3 users,  load average: 0.00, 0.00, 0.00
   98 swing: package emacs is not installed
   99 DEBUG: Removing keys from agent
  100 DEBUG: Stopping Agent
  101 
  102 
  103 
  104 
  105 	SITUATION E (asynchronous mode with ssh-agent already running):
  106 	Asynchronous mode (-m) allows you to get done a lot quicker by
  107 	not having to wait for one host to finnish before moving on to
  108 	the next.
  109 
  110 
  111 [doughnut@shoe mussh]$ mussh -h swing slide junglegym -c 'echo hello ; sleep 2 ; echo bye' -m2
  112 junglegym: hello
  113 slide: hello
  114 junglegym: bye
  115 swing: hello
  116 slide: bye
  117 swing: bye
  118