How could I shutdown, over my network, with one click?

Posted by DeLiK on Ask Ubuntu See other posts from Ask Ubuntu or by DeLiK
Published on 2012-09-21T08:43:53Z Indexed on 2012/09/21 9:50 UTC
Read the original article Hit count: 310

Filed under:
|
|
|

The question is simple.
What would be the script I would have to use to shut down a computer in my network thru ssh.

Normaly i would go to command line and:

ssh desktop

delik@desktop's password: 

delik@desktop:~$ sudo shutdown -P 0

To power on I created a file and wrote:

wakeonlan xx:xx:xx:xx:xx:xx

And gave it the executable bit

That way to power on it requires only a double click. Would i be capable of doing the same to shutdown?

© Ask Ubuntu or respective owner

Related posts about ssh

Related posts about shutdown