LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 08-17-2011, 05:30 AM   #1
venkarthi
LQ Newbie
 
Registered: Jul 2011
Posts: 7

Rep: Reputation: Disabled
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.
 
Old 08-17-2011, 07:03 AM   #2
salemeni
Member
 
Registered: Aug 2011
Posts: 64

Rep: Reputation: Disabled
Post

Quote:
Originally Posted by venkarthi View Post
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

Last edited by salemeni; 12-06-2011 at 02:59 AM.
 
Old 08-17-2011, 11:51 PM   #3
venkarthi
LQ Newbie
 
Registered: Jul 2011
Posts: 7

Original Poster
Rep: Reputation: Disabled
any sample script file please help me
 
Old 08-18-2011, 12:16 AM   #4
tailinlinux
Member
 
Registered: Oct 2010
Location: Paudpod, Botolan, Zambales, Philippines
Distribution: Mandriva, Ubuntu, Mint, Open Suse, Meego
Posts: 390
Blog Entries: 3

Rep: Reputation: 25
Quote:
Originally Posted by venkarthi View Post
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.
 
Old 08-18-2011, 04:30 AM   #5
venkarthi
LQ Newbie
 
Registered: Jul 2011
Posts: 7

Original Poster
Rep: Reputation: Disabled
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
 
Old 08-18-2011, 04:48 AM   #6
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
Quote:
Originally Posted by venkarthi View Post
i am using ssh mode to shutdown from script but i have to enter password for each machine
Use ssh keys.
 
Old 08-19-2011, 02:25 AM   #7
salemeni
Member
 
Registered: Aug 2011
Posts: 64

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

generics array

Last edited by salemeni; 12-06-2011 at 03:00 AM.
 
0 members found this post helpful.
  


Reply



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
Start-Up Script & Shutdown/Kill Script needed guggilamsandeep Red Hat 1 05-11-2011 08:58 AM
shutdown script CrashedAgain Linux - Software 5 04-08-2008 05:16 PM
script shutdown djaac Programming 2 01-24-2007 07:01 AM
shutdown script kehkok Linux - Software 1 06-16-2006 07:05 AM
script at the shutdown dominant SUSE / openSUSE 4 10-15-2005 07:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:20 AM.

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
Open Source Consulting | Domain Registration