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 |
Code:
shutdown -r now Code:
man shutdown |
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 |
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. |
No problem thanks for the quick reply regardless :)
|
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
|
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 :D
I will set this up, test and let you know how it goes - unless everyone already knows this! Many thanks Dave |
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. |
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?
|
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 :) |
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?
|
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?!?!
|
Then why don't you ask the admin to keep SSH running or reboot the server for you?
|
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!
|
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? |
All times are GMT -5. The time now is 01:26 AM. |