Use Windows Remote Terminal to turn off the Linux host

Source: Internet
Author: User
Tags apc
Turn off the Linux host-Linux Enterprise Application-Linux server application information on the remote end of Windows. The following is a detailed description. This is a requirement of my own company. We need to shut down all the machines in the data center safely before the UPS is insufficient during power failure.

Let's talk about how the company solved the problem. Previously, the company purchased advanced UPS of APC and purchased an additional dedicated UPS Network Card to install it. As a result, the company changed itself to a UPS with a network route to be inserted, you can also view the UPS status in http mode in the browser! Each computer can install a monitoring program to connect to the UPS through the network. When the UPS is not powerful enough, it will notify all computers to shut down, and this monitoring program is written in Java, it provides a variety of operating systems, including Windows and Linux. Therefore, it is easy and easy for the company to shut down all Windows and Linux computers when the UPS is insufficient.

Although the company uses the 2U rack 2U UPS of APC, it is more advanced than the general UPS, but it does not have the ability to install the network interface. You can use USB to find a Windows instance to monitor the UPS. If the UPS is insufficient, run the following command before shutdown:

Shutdown/m \ (computer name)/s/t 0

In addition, the Domain Admins identity is used to command Windows computers in other domains, so there is no identity authentication problem, all of which can be turned off.

But Linux Hosts are helpless ~

At last, this situation came to light. My friend Pxxx said that the plink command column tool can be connected to Linux Using ssh and automatically execute commands in a text file. I tried it for a moment. That's really good. Take notes.

My method is:

Plink root @ (IP location)-pw (password)-m (text file)

Write sync in the text file; shutdown-h

In this way, the remote Linux can be shut down in windows. The minor disadvantage is that the root password is clearly visible, but it is used by the data center. Generally, employees cannot see it and it is enough.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.