Click to See Complete Forum and Search --> : Beginner in C/Linux


nacum
11-14-2003, 09:16 PM
Scenario: Setup a peer-peer network.
Situation: As one box is booting..it needs to run a script that will shutdown the other box that is already up.
Problem: beginner and frankly getting confused in this process

I believe in my script I have to have ssh root @myip /sbin/shutdown -r now, but the problem is how do I disable the Rhostsauthentication from running so that it will automatically send the boot command to the other box.
Finally, do I place the file in the init.d folder so it will run during boot up..
Help Please :confused:

Both computers are running Redhat 9 and they see each other fine on the network.

Didn't try to sound too dumb :D

vhg119
11-15-2003, 08:27 PM
you can have rc.local run the script
its in rc.d directory.. i think?

nacum
11-17-2003, 08:34 PM
Appreciate the info..as for the scipt I used Autoexpect before the ssh command and it wrote the scriot for me...bought me some time for this project..now to get the file loaded..:)