Home » Questions » Computers [ Ask a new question ]

How to shut down a computer having a particular IP address?

How to shut down a computer having a particular IP address?

If we have a collection of Windows and Linux computers on a LAN, is it possible to shutdown a computer having a specific IP address, using the Linux shell?

Asked by: Guest | Views: 215
Total answers/comments: 5
Guest [Entry]

"Just to give you an answer based on your question:
""Shutting down a pc based on just the ip address is impossible""

You can make it possible by making their desktops or shells available over the network. RDP(windows) / SSH or VNC (linux) will do."
Guest [Entry]

Windows has the shutdown /m \\computername command built in, but for Linux you probably would have to install ssh and use ssh root@computername /sbin/shutdown. Why wouldn't a Linux box have SSH installed, anyway?
Guest [Entry]

"If you install the SSH service, as mentioned before, you can use the ssh command such as:

ssh root@myhost.domain.com shutdown -hy 0

In order to have this all automated, the key exchange should be done, so your private key is in your default ~/.ssh/identity file, and the public part in the ~/.ssh/authorized_keys file on the remote host.

If you look at SSH, you will see all the options and much more."
Guest [Entry]

"Type shutdown -i in the run window.
Click the ""Add"" button and type the name of the computer you want to shutdown or its IP address.
You can select what you want the computer to do.
In this mode, it's necessary to add a comment. Do so.
Press OK."
Guest [Entry]

"It is possible through the command as

shutdown -s -f -m \\""ip of remote machine"" -t xx

but for this the system must be in lan... -t xx is seconds which you have to specify."