Remotely Reboot a Linux Box From a Windows Server

Posted on 2013-01-09
Last Modified: 2013-01-17
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?
Question by:portillosjohn
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +2
LVL 31

Expert Comment

ID: 38759201
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

As soon as you issue this command, you will lose your session.
LVL 88

Expert Comment

ID: 38759205
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:
LVL 10

Expert Comment

ID: 38759209
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).
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

LVL 31

Expert Comment

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

For that issue command
shutdown -r +5
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 38759306
What kind of access to you have to your Linux machine? Is it hosted somewhere or just in another office of your company?

Author Comment

ID: 38759317
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.
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 38759355
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?
LVL 10

Accepted Solution

bigbigpig earned 500 total points
ID: 38759383
You can script it using plink.  Here's a good example:

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.

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question