Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 408
  • Last Modified:

Remotely Reboot a Linux Box From a Windows Server

Im not sure if this is possible but I would like to remotley reboot a linux server from a windows 2003 server at a remote location using an ip address. Using a script or other means. is this possible if so how?
0
portillosjohn
Asked:
portillosjohn
  • 2
  • 2
  • 2
  • +2
1 Solution
 
farzanjCommented:
It is possible, depending on your setup.

You need to access the server somehow.  One way is to use Putty ssh session to get to the command line.

You have to become the root user and issue command

init 6
or
reboot

As soon as you issue this command, you will lose your session.
0
 
rindiCommented:
If you have SSH access to the remote server, start putty or kitty on your location and you'll be able to connect to a terminal on the Linux server. then you can use the sudo reboot command to reboot the Linux server:

http://portableapps.com/apps/internet/kitty-portable
http://portableapps.com/apps/internet/putty_portable
0
 
bigbigpigCommented:
You can use any SSH client you'd like from the Windows box if you have SSH running on the Linux server and you're able to access the port it's running on (usually 22).
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
farzanjCommented:
It is also better to give 5 minutes warning to user's before you reboot it.

For that issue command
shutdown -r +5
0
 
Gerwin Jansen, EE MVETopic Advisor Commented:
What kind of access to you have to your Linux machine? Is it hosted somewhere or just in another office of your company?
0
 
portillosjohnAuthor Commented:
I am not that farmiliar with linux. So I cannot just use a script to do the whole thing? I was hoping for more of bat type file.
0
 
Gerwin Jansen, EE MVETopic Advisor Commented:
No, you can't do it that way, you need access (ssh as suggested) to the machine to perform the reboot. Are you managing the machine or do you have some remote person that can assist you in some way?
0
 
bigbigpigCommented:
You can script it using plink.  Here's a good example:

http://www.experts-exchange.com/OS/Linux/Distributions/Ubuntu/Q_26399298.html

plink root@linuxip -pw rootpassword "reboot"

Open in new window


But again, this uses SSH, so make sure SSH server is running on the linux server, and you are able to access it's port (usually 22) from your Windows machine.
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

  • 2
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now