Put a Windows computer to sleep remotely (from a Linux box)

3

1

I'd like to have my Linux box (a QNAP TS-210 NAS) send the order to go to sleep (or hibernation) to my main Windows 7 computer.

As the NAS is running Linux, I can't use psshutdown from SysInternals' PsTools. Is there any Linux equivalent? Or some "magic packet" that can order the Win7 computer to sleep.

I know I could install a SSH daemon and trigger a shutdown command from the Linux box using ssh, but ideally I do not want to install anything on the Win7 computer.

I can install Linux software on the NAS, no problem about this. PHP, python and perl are also available on it.

Snark

Posted 2010-02-13T18:56:46.470

Reputation: 30 147

While searching for an answer for you I came across this. While not for you someone else might find it helpful http://www.online-tech-tips.com/computer-tips/remote-shutdown-command/

– Unfundednut – 2010-02-13T21:23:09.823

@Snark why not install wine on the nas and use that to run psshutdown? – Unfundednut – 2010-02-13T21:29:03.570

@MrStatic: Thanks for the link. The NAS has an ARM CPU, it cannot run Wine. – Snark – 2010-02-13T22:16:54.253

Answers

1

Yes.

You can use the net rpc shutdown -I x.x.x.x -U username%password command from linux (I think - it works under XP).

I had to install my distribution's samba package to get the net command. You'll have to enable remote shutdown on your windows box too. Have a look at how to do it in xp. You might have to add a few parameters if you want to put your win box to sleep instead of shutting down though.

brice

Posted 2010-02-13T18:56:46.470

Reputation: 2 206

What are the needed parameters to hibernate the Windows machine? – Pitto – 2018-05-04T07:28:50.950

0

http://www.vistaheads.com/forums/microsoft-public-windows-vista-general/2325-how-make-computer-sleep-remotely.html

This modifies Remote Desktop to display all the shutdown options. This is the same way all the shutdown options show up when you remote into Server 2003/2008.

surfasb

Posted 2010-02-13T18:56:46.470

Reputation: 21 453