Remotely Reboot Linux Box From a Windows PC.
Hello,
We have a Linux Computer at work that occasionally has some problems and needs to be rebooted. But the problem is that the manager of that Dept isn't the most technical person in the world and would like to make this as painless as possible for her. She is running Windows XP Pro. If it were a Linux machine she was running I would probably just write a little simple Expect script that would ssh to the server and send the "shutdown -r now" command and that would be it. But how would I go about doing that on a windows machine. Is there a way to write an Expect script and make it executable in windows? So all she would have to do is "Click the icon" and that's it? Thanks, Matt |
At first, wouldn't it be better to fix the issues then to reboot the server to fix the symptoms?
To your problem, just use a command line client for SSH in Windows that can do key based authorization and allow her account to reboot the machine using sudo. This way you can write a simple batch script she can click on. |
hi,
here's what i found with a quick google search. is that what you need? http://fixunix.com/ssh/253629-how-pa...h-execute.html |
TobiSGD,
Quote:
millgates, Quote:
Do you know to use ExtraPutty to send commands from I guess another text like file with a separate command on each line? Thanks, Matt |
Quote:
Quote:
|
Millgates,
Quote:
Thanks for the suggestion, I'll give it a try when I get back to work tomorrow and let you know how it goes. Thanks again, Matt |
plink will do automated connections.
http://the.earth.li/~sgtatham/putty/.../Chapter7.html |
Michaelk,
I'll check that out thanks. -Matt |
It's axiomatic that a Linux box (and a Windows box, for that matter...) ought not need to be "rebooted." Tools exist ... Nagios, and others ... which can monitor the network connection and automatically restart it.
But, even so, the problem needs to be diagnosed and repaired. (Look at the system log files on both of the machines in question.) Network connections should not "go down unexpectedly." Maybe there's a timeout or something. When and if things like this do happen, the computer should be perfectly capable of issuing the necessary corrective action with no human intervention required. I have quite routinely encountered Linux systems (and Windows systems, for that matter :eek: ...) which have 'up times' of more than a year. They are never "rebooted," and they never need to be. |
sundialsvcs,
Quote:
Do you know where/what logs I should look at to find the problem? It's basically two computers that somehow get a connection through a flash script. I dunno if it helps to narrow down what logs to look at but it works like this: The computer running the flash script connects to the other and pulls out some data and displays it using the flash "video". This program that a coworker wrote contains one flash file (.swf) and one HTML file. To run it you would right-click the HTML file and run it in Firefox. The "video" is then displayed in Firefox somewhat like a slideshow of data. Thanks, Matt |
one solution i've seen on dd-wrt (though probably a horrible idea on a production server) would be to create a user 'reboot' with permissions to reboot the system, then set it's shell to /sbin/reboot, thus simply logging in with that user triggers a reboot, though unless you can restrict how that account gets accessed that would probably be a last ditch idea
|
Hey Guys,
Thanks for everyone's help. And MillGates thanks for the suggestion with a user whose sole purpose would be to restart the computer, got it working and it works perfectly. Thanks again, Matt |
All times are GMT -5. The time now is 01:39 AM. |