Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-18-2005, 10:05 AM
|
#1
|
Member
Registered: Sep 2005
Location: Ägypten
Distribution: Ubuntu 5.10
Posts: 155
Rep:
|
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
|
|
|
09-18-2005, 10:16 AM
|
#2
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
Welcome to LQ.
The easiest way would probably be to set up public key authentication using SSH:
http://www.linuxquestions.org/questi...ticle&artid=79
|
|
|
09-18-2005, 10:21 AM
|
#3
|
Member
Registered: Sep 2005
Location: Ägypten
Distribution: Ubuntu 5.10
Posts: 155
Original Poster
Rep:
|
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
|
|
|
09-18-2005, 10:27 AM
|
#4
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
Sure, once you have set up the authentication you just need to loop through each host in a list and run the command - ie:
hosts="hosta hostb hostc"
for host in $hosts;do
ssh user@$host command
done
|
|
|
09-18-2005, 02:33 PM
|
#5
|
Member
Registered: Sep 2005
Location: Ägypten
Distribution: Ubuntu 5.10
Posts: 155
Original Poster
Rep:
|
mmm this is nice, but someone told me that there is a command i think P2 or something like that : P2 command host-list . is it a valid command?
thanks
|
|
|
All times are GMT -5. The time now is 06:20 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|