tag:blogger.com,1999:blog-6825731201864178309.post261748357533632102..comments2022-12-04T22:31:50.444-05:00Comments on crdlo: parallel ssh tool roundupcrdlohttp://www.blogger.com/profile/12125558929574686676noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-6825731201864178309.post-52229043025612968782011-08-10T11:08:24.917-04:002011-08-10T11:08:24.917-04:00http://m.a.tt/er/massh
http://m.a.tt/er/ambit
Sha...http://m.a.tt/er/massh<br />http://m.a.tt/er/ambit<br /><br />Shameless self promotion. Originally Massh was a serialized script for pushing, then running small, procedural 'jobs' on multiple hosts and was named deploy.sh (not the Jetty deploy.sh - yet another one ). Like you, I found myself searching and trying the parallel ssh'ers that existed at that time. I tried a few and settled on one from your list that will remain unnamed. <br /><br />I work in a very large environment. Initially I used my chosen parallel ssh'er rather conservatively - slowly but surely using it for more complicated tasks, on increasingly more hosts. It did not take long for said ssh'er to completely fall over with performance issues (setting inflight ssh connections to 10 for a couple hundred target hosts crushed the box I was running the ssh'er from). Another area where almost all ssh'ers failed miserably was output. Most of them were fine dealing a with single line of output per target host. Most of them were useless for multi-line output per target host (what's the point of returning out-of-order output for df -h [/usr of host x directly under / of host y]?). This inspired me to write Massh. <br /><br />Massh is written in Bash, but has existed previously in Perl (Went from Bash, to Perl, to a Perl variant written almost entirely by an employee of mine at a past company, back to Bash). Massh has a companion script - Ambit - that handles enumerating hostnames and managing HostGroups from an ever increasing # of sources:<br /><br />Files<br />Predefined System Wide HostGroups<br />Predefined User Specific HostGroups<br />Predefined Network HostGroups [DNS TXT records]<br />last but not least...<br /> Ambit expandable string[s] on the command line (example below)<br /><br />In the near future I will be adding support for Genders (used by pdsh) and and NIS netgroups. In fact Gender support is probably already working but I've yet to test it. <br /><br /><br />Example: Ambit Expanding Hostlist from String Provided on the Command Line <br /><br />$ ambit ns[1..5].[apple,google,twitter,facebook].com<br />ns1.apple.com<br />ns1.facebook.com<br />ns1.google.com<br />ns1.twitter.com<br />ns2.apple.com<br />ns2.facebook.com<br />ns2.google.com<br />ns2.twitter.com<br />ns3.apple.com<br />ns3.facebook.com<br />ns3.google.com<br />ns3.twitter.com<br />ns4.apple.com<br />ns4.facebook.com<br />ns4.google.com<br />ns4.twitter.com<br />ns5.apple.com<br />ns5.facebook.com<br />ns5.google.com<br />ns5.twitter.com<br /><br />Massh does the following very well and very parallelized:<br /><br />Runs Commands on Target Hosts <br />Runs Local Scripts on Target Hosts<br />Pushes Files to Target Hosts <br />Pulls Files From Target Hosts<br /><br />Here is a short vid that gives a good indication of Massh's performance (the # of hosts in the vid is 200):<br /><br /><a href="http://m.a.tt/er/massh-is-fast.mov" rel="nofollow">massh-is-fast.mov</a><br /><br />This image shows well ordered and clear multi-line output. <br /><br /><a href="http://m.a.tt/er/multi-line-output" rel="nofollow">multi-line-output.jpg</a><br /><br />As for these two requirements:<br /><br />"I just want to specify hosts on the command line (with no prior setup). I really don't even want to required ssh keys or having the same password if I can avoid it."<br /><br />Massh does depend on ssh private/public keys - BUT - I have a working first build of a parallelized public key deployer. It *safely* prompts the user for their password for the target hosts and then quickly installs the public key in parallel. The problem is the "[not] having the same password" part. I really don't know of an effective way to manage multiple passwords, that can be referenced by an ssh'er during auth AND is actually secure. I almost always insist that users have no password set (shadow entries are set to ! invalid string) and SSH only allow keyed authentication. Let me know if you try out Massh. Feel free to contact me if you have any issues or want to suggest a feature. <br /><br />Regards,<br />Mike (Massher) MarschallUnknownhttps://www.blogger.com/profile/17251806262809569364noreply@blogger.com