LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 09-22-2011, 10:46 AM   #1
alancampbell6
LQ Newbie
 
Registered: Jul 2011
Posts: 16

Rep: Reputation: Disabled
Reboot multiple systems remotely?


I currently have a script that ssh's on to each machine in a list sequentially and while is is in one machine it calls another script, to reboot the system. the second script is simply "sync;sync;reboot -f". However it hangs in this script while rebooting the first system so it fails to go on to the next machine!

Any ideas?
 
Old 09-22-2011, 10:49 AM   #2
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,161

Rep: Reputation: 889Reputation: 889Reputation: 889Reputation: 889Reputation: 889Reputation: 889Reputation: 889
maybe this will work
Code:
sudo shutdown -r now &
exit
 
Old 09-22-2011, 11:37 AM   #3
alancampbell6
LQ Newbie
 
Registered: Jul 2011
Posts: 16

Original Poster
Rep: Reputation: Disabled
Thanks, now it says "sudo: sorry, you must have a tty to run sudo"??
 
Old 09-22-2011, 11:39 AM   #4
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by alancampbell6
Thanks, now it says "sudo: sorry, you must have a tty to run sudo"??
Read the manpages for ssh(1). Specifically, see the (multiple) -t option.
 
Old 09-22-2011, 02:09 PM   #5
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,161

Rep: Reputation: 889Reputation: 889Reputation: 889Reputation: 889Reputation: 889Reputation: 889Reputation: 889
Quote:
Originally Posted by alancampbell6 View Post
Thanks, now it says "sudo: sorry, you must have a tty to run sudo"??
i' do:
ssh xbmc@192.168.1.105 sudo shutdown -h now

to shutdown my xbmc mschine remotely.
 
  


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
how to shutdown group of linux systems remotely from windows srini_rathika Linux - Newbie 1 03-05-2008 04:04 AM
disable shutdown/reboot remotely jessicaK Linux - Security 4 01-29-2008 12:20 PM
Need to hard reboot a machine remotely thetawaverider Linux - Networking 3 02-28-2007 03:03 PM
FC5 seems to be running very slow, can't reboot remotely lapthorn Fedora 2 03-30-2006 07:53 AM
Remotely reboot by an user zsolt_tuser Mandriva 7 07-10-2004 06:37 PM

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

All times are GMT -5. The time now is 08:32 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration