View Single Post

  #2 (permalink)  
Old 06-21-2008, 11:29 PM
rockdalinux's Avatar
rockdalinux rockdalinux is offline
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 581
Rep Power: 7
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default

Steve,

Welcome to nixCraft forum!

Yes a script can be used to run files and all other stuff. First, you need to setup password less login using ssh-keys between your host and other servers:

Howto Linux / UNIX setup SSH with DSA public key authentication (password less login)

Howto use multiple SSH keys for password less login


The host will run a script, it will login to each system and it will remove files. Here is a sample script to kick start development:
Code:
#!/bin/bash
SERVERS="box1 box2 box3"
for b in $SERVERS
do
  ssh user@$b /bin/rm /path/to/file
done
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat
Reply With Quote