LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-03-2006, 04:41 AM   #1
assasukasse
Member
 
Registered: Mar 2006
Location: UK
Distribution: Debian, Ubuntu
Posts: 132

Rep: Reputation: 15
cluster script


now a more interesting problem:
i am running a temporary cluster using parallelknoppix
a knoppix derivative with ssh enabled
the program i use for parallel calculation REQUESTS
that i have telnet and rsh installed on all machine and that ALL of them are accessible via telnet and rsh..it uses them to sync the tasks
i wish to make a script, that when run from the master node via ssh on all the slaves would install telnet and telnetd, rsh and rshd on all the machines including the master, and immediately start the services.
i can't reboot in between since its a live distro and every change would be lost.
i have no clue how to do that and i wish some hints..
thanks!
 
Old 05-03-2006, 07:43 AM   #2
assasukasse
Member
 
Registered: Mar 2006
Location: UK
Distribution: Debian, Ubuntu
Posts: 132

Original Poster
Rep: Reputation: 15
i made this template..maybe someone could correct it:

script.sh
Code:
#!/bin/sh
for machine in /home/knoppix/hostdef
do
ssh $machine sh installer.sh &
done
installer.sh
Code:
#!/bin/sh
sudo apt-get update
sudo apt-get install rshd telnetd telnet rlogin rsh
sudo /etc/rc.d/rshd start
sudo /etc/rc.d/telnetd start
done
any idea?
 
Old 05-03-2006, 07:55 AM   #3
muha
Member
 
Registered: Nov 2005
Distribution: xubuntu, grml
Posts: 451

Rep: Reputation: 37
I'd recommend using key-phrases but this article has a nice start for a script without them:
http://www.linuxjournal.com/comment/reply/8600
 
Old 05-03-2006, 10:21 AM   #4
assasukasse
Member
 
Registered: Mar 2006
Location: UK
Distribution: Debian, Ubuntu
Posts: 132

Original Poster
Rep: Reputation: 15
further investigation made me know that only RSH is needed!
 
Old 05-03-2006, 01:01 PM   #5
assasukasse
Member
 
Registered: Mar 2006
Location: UK
Distribution: Debian, Ubuntu
Posts: 132

Original Poster
Rep: Reputation: 15
again
on echelon website i found this script used to update ssh

Code:
#!/bin/bash
for ((i=1; i <= 30 ; i++)) #run through all nodes
do
echo updating node $i
scp /etc/passwd e$i:/etc/
scp /etc/passwd- e$i:/etc/
scp /etc/shadow e$i:/etc/
scp /etc/shadow- e$i:/etc/
scp /etc/gshadow e$i:/etc/
scp /etc/gshadow- e$i:/etc/
scp /etc/group e$i:/etc/
scp /etc/group- e$i:/etc/
done
echo all passwords updated
also they found a way to override the need for rsh..

Quote:
Perhaps the easiest way to avoid using rsh is to use ssh interchangeably.
One may simply uninstall all rsh,rcp and rlogin programs from the system
then link ssh, scp, and slogin to the corresponding r names.
The s programs have been designed to function exactly the same as the r
programs except in a secure manner.
However, some programs will still require the hosts.equiv and .rhosts file
to ascertain cluster information.
These can be created in the normal method but without the actual rprograms
installed on the system they donít pose any security threat.
so this is the final solution..
but my knowledge of linux doesn't allow me to apply it easily..
should i make symlinks to ssh scp and slogin and name the symlinks as rsh rcp and rlogin?
and again, should this be done on every node or i can script it?
thanks!

Last edited by assasukasse; 05-03-2006 at 01:08 PM.
 
Old 05-03-2006, 01:47 PM   #6
assasukasse
Member
 
Registered: Mar 2006
Location: UK
Distribution: Debian, Ubuntu
Posts: 132

Original Poster
Rep: Reputation: 15
would this do the trick?

Code:
#!/bin/sh
for machine in /home/knoppix/hostdef
do
ssh $machine 'ln -s /usr/bin/ssh /usr/bin/rsh ;\
ln -s /usr/bin/scp /usr/bin/rcp ;\
ln -s /usr/bin/slogin /usr/bin/rlogin'
done
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Penguin Computing's Scyld ClusterWare(TM) HPC Offers Enhanced High Availability and Most Advanced Linux Cluster Virtualization, Enabling Broader Cluster Use LXer Syndicated Linux News 0 04-06-2006 07:03 PM
Cluster question: Is it possible to make a bulletproof cluster? ValidiusMaximus Linux - Software 1 09-06-2005 03:07 PM
Setting up a cluster with pxe and cluster knoppix bucovaina78 Linux - Networking 1 05-16-2005 12:29 AM
rsh script to run on cluster podollb Linux - Networking 3 03-10-2004 11:22 AM
me wants cluster me wants cluster me wants cluster funkymunky Linux - Networking 3 01-06-2004 08:51 AM


All times are GMT -5. The time now is 04:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration