Re: [SLUG] better way to consolidate shell commands

From: Kwan Lowe (kwan@digitalhermit.com)
Date: Thu Aug 19 2004 - 15:57:38 EDT


> hey all....
>
> I've been taking advantage of the shared rsa key that Ian set me up with
> a while back for our 122 render nodes that allows me to ssh without a
> pwd to those specific machines. The next step was to create a couple of
> anyscript.sh shell scripts that basically do a given command on all of
> them. for example ( and I know this is very basic so try not to laugh
> too hard.....) -
>
> #! /bin/sh
>
> echo "attempting to ssh 192.168.3.2 as root"
> ssh root@192.168.3.2 "df -h"

Besides what Levi has posted, you can also use dsh, the distributed shell, to
run commands on multiple machines. You maintain a list of machines, so it's
not exactly what you're looking for, but may be useful nonetheless.

-- 
* The Digital Hermit   http://www.digitalhermit.com
* Unix and Linux Solutions   kwan@digitalhermit.com
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS).  Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 15:00:39 EDT