LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-28-2012, 11:05 AM   #1
davemac2626
Member
 
Registered: Mar 2012
Posts: 33

Rep: Reputation: Disabled
Remote reboot from another server??


Hi all

I was just wondering if there is any way of remotely rebooting a linux server from another? ie: like the shutdown -i command in Windows....

If you cannot SSH onto the problem server can you reboot it via another machine?

Thanks in advance

Dave
 
Old 09-28-2012, 11:12 AM   #2
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Code:
shutdown -r now
?
Code:
man shutdown
For more options.
 
Old 09-28-2012, 11:21 AM   #3
davemac2626
Member
 
Registered: Mar 2012
Posts: 33

Original Poster
Rep: Reputation: Disabled
shutdown -r now is on the actual server im on about shutting down 1 server from another...

for example: shutdown -r now 10.1.1.1 (CLI on 10.1.1.2)

Thanks
 
Old 09-28-2012, 11:26 AM   #4
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Sorry, for some reason I completely misread your post and though you could SSH onto the server.

You need to connect to some kind of server service running on the machine to restart it though, as you do on a Windows machine.

Last edited by 273; 09-28-2012 at 11:27 AM.
 
Old 09-28-2012, 11:27 AM   #5
davemac2626
Member
 
Registered: Mar 2012
Posts: 33

Original Poster
Rep: Reputation: Disabled
No problem thanks for the quick reply regardless
 
Old 09-28-2012, 11:28 AM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
If you want to reboot a server that you can not connect to through the network you have to use a hardware management interface, like IPMI: http://en.wikipedia.org/wiki/Ipmi
 
Old 09-28-2012, 02:49 PM   #7
davemac2626
Member
 
Registered: Mar 2012
Posts: 33

Original Poster
Rep: Reputation: Disabled
Thanks for the reply again - so there is no way of doing it with snmpset?? I know that its possible to do this on a cisco switch using the snmpset method as long as write access is granted, plus you can do it with shutdown -i with windows - it then surely is possible on a linux box? i have just been doing some digging and found that if netcat is setup to listen on one server you can create a back-door to take control

I will set this up, test and let you know how it goes - unless everyone already knows this!

Many thanks

Dave
 
Old 09-28-2012, 03:10 PM   #8
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
You can use shutdown -i on Windows only when the appropriate service is running (RPC?) and the port is open. I don't recall whether Windows opens the port to the world by default or not but I've certainly come across situations where machines can't be shut down with that command.
For any OS to reboot you have to get a message to the kernel of the OS through a listening server. I'll admit my Linux specific knowledge on this isn't great but I would consider any such service a huge security hole unless, like SSH, it's authenticated.

Last edited by 273; 09-28-2012 at 04:12 PM. Reason: I typed "post" not "port"
 
Old 09-28-2012, 03:59 PM   #9
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
I thought you are looking for a solution in case the machine has crashed, so that no SSH connection is possible. In that case you need hardware support, like IPMI. If the machine is working correctly, what would be the point in using an insecure netcat hack instead of just running SSH?
 
Old 09-29-2012, 05:33 AM   #10
davemac2626
Member
 
Registered: Mar 2012
Posts: 33

Original Poster
Rep: Reputation: Disabled
Thanks for the reply guys....

TobiSGD - it is for a Linux box acting as a B2BUA and the SSH does keep dying so I cannot access the box so wanted a solution of rebooting it as the server is located around 20 miles away in the DC and "remote hands" are not available - its completely internal so the security implications don't really come into it which is why I was thinking of a back-door for future use.

Hope this explains better my reason for the original post
 
Old 09-29-2012, 06:11 AM   #11
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
So if I get that right: The whole problem is that the SSH server goes down and instead of trouble-shooting that problem, like an admin would normally do, you plan to implement a backdoor?
 
1 members found this post helpful.
Old 09-30-2012, 02:33 PM   #12
davemac2626
Member
 
Registered: Mar 2012
Posts: 33

Original Poster
Rep: Reputation: Disabled
Hang on a min!....firstly I never said I was any sort of admin! If you look at my other posts it explains that I am a noob in Linux. Secondly I thought the whole point of forums like these was to HELP people with ideas! No need to be a tube about it is there?!?!
 
Old 09-30-2012, 02:34 PM   #13
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Then why don't you ask the admin to keep SSH running or reboot the server for you?
 
Old 09-30-2012, 02:58 PM   #14
davemac2626
Member
 
Registered: Mar 2012
Posts: 33

Original Poster
Rep: Reputation: Disabled
There is no admin! otherwise trust me I would! there is noone with extensive Linux experience I'm a noob and i'm probably the most clued up on Linux! only cos of the previous help on here which is why I decided to post another question! along with reading, research and questions thats how you get to know things, which is what i was trying to achieve!
 
Old 09-30-2012, 03:08 PM   #15
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Then I think TobiSGD may have a point. Opening a back door in a server to get around a failing daemon isn't a great idea so the real answer is probably to troubleshoot SSH.
Otherwise you're possibly looking at buying a network card with built in console or similar anyhow. Do you know whether the server has such a facility?
 
  


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
Prevent Remote Server Reboot dnice58 Linux - Server 1 09-16-2008 06:44 PM
Remote Ubuntu server not responding.. any way to reboot? JamesH Linux - General 1 02-18-2007 05:48 PM
Disable remote login shutdown/reboot student04 Linux - Security 1 03-06-2005 08:29 PM
Remote Reboot -Linux Redhat 7.3 dolvmin Linux - Software 6 08-26-2003 08:31 PM
remote installation with no reboot born4linux Linux - General 3 09-04-2002 10:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:53 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
Open Source Consulting | Domain Registration