Results 1 to 4 of 4

Thread: Run a program on multiple pcs

  1. #1
    Administrator Associate gr8rcake's Avatar
    Join Date
    May 2004
    Posts
    44

    Run a program on multiple pcs

    i use RedHat 7.2, i have many pcs in my LAN (linux m/c). i wrote a program and i want to ask is there any command that can help me to run this program on all these machines at ones from my server? is it possible?
    thanks

  2. #2
    The easiest way would probably be to set up public key authentication using SSH:

    http://www.linuxhomenetworking.com/l...ssh-server.htm

  3. #3
    Administrator Associate gr8rcake's Avatar
    Join Date
    May 2004
    Posts
    44
    Is there any other way to be done programmatically? i want to write a shell script (tcsh or bash) r to use Perl that execute my program on each m/c (i have a list of the names...)
    thanks

  4. #4
    Sure, once you have set up the authentication you just need to loop through each host in a list and run the command - ie:

    Code:
    #!/bin/bash
    hosts="hosta hostb hostc"
    for host in $hosts;do
    ssh user@$host command
    done

Similar Threads

  1. Multiple NIC drivers
    By amruta_85 in forum Linux - Hardware, Networking & Security
    Replies: 0
    Last Post: 03-06-2008, 05:07 AM
  2. Multiple IPs
    By mobo2000 in forum Linux - General Topics
    Replies: 1
    Last Post: 06-13-2007, 04:52 PM
  3. Multiple Oracle DB With EL ES 4
    By Prasad.Arangath in forum Linux - General Topics
    Replies: 2
    Last Post: 04-13-2006, 12:03 PM
  4. YUM and multiple repositories
    By elovkoff in forum Linux - Hardware, Networking & Security
    Replies: 1
    Last Post: 08-12-2004, 03:01 PM
  5. multiple floppies
    By kornp in forum Linux - General Topics
    Replies: 3
    Last Post: 06-17-2002, 02:28 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •