LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   shutdown script (https://www.linuxquestions.org/questions/linux-newbie-8/shutdown-script-897801/)

venkarthi 08-17-2011 05:30 AM

shutdown script
 
i am new to RHEL 4. is there anyway to write script file to shutdown/reboot/ and poweron/poweroff the 50 systems form a single system.

salemeni 08-17-2011 07:03 AM

Quote:

Originally Posted by venkarthi (Post 4445382)
i am new to RHEL 4. is there anyway to write script file to shutdown/reboot/ and poweron/poweroff the 50 systems form a single system.

Yes if you have a ssh access.

generics array

venkarthi 08-17-2011 11:51 PM

any sample script file please help me

tailinlinux 08-18-2011 12:16 AM

Quote:

Originally Posted by venkarthi (Post 4445382)
i am new to RHEL 4. is there anyway to write script file to shutdown/reboot/ and poweron/poweroff the 50 systems form a single system.

To manipulate a 50 system from a single system you need to enable your ssh server.
Im a mandriva user. And im using some command line when i want to a reboot/ power off a certain system
in a far location.
example: halt - command computer to shutdown
reboot - command computer to restart

Hope this one helps.

venkarthi 08-18-2011 04:30 AM

i am using ssh mode to shutdown from script but i have to enter password for each machine

one of my script line is below

ssh root@192.168.34.184 halt

sycamorex 08-18-2011 04:48 AM

Quote:

Originally Posted by venkarthi (Post 4446464)
i am using ssh mode to shutdown from script but i have to enter password for each machine

Use ssh keys.

salemeni 08-19-2011 02:25 AM

To automate this task try to use expect command
http://bash.cyberciti.biz/security/e...-login-script/

generics array


All times are GMT -5. The time now is 10:09 PM.