I have 5 desktops, all running Ubuntu 14.04 64 bit.
All are connecting to the Internet through the LAN (using a dlink switch),
i want to shutdown all the computers from a single computer,is it possible ? if yes how it is possible ?
I have 5 desktops, all running Ubuntu 14.04 64 bit.
All are connecting to the Internet through the LAN (using a dlink switch),
i want to shutdown all the computers from a single computer,is it possible ? if yes how it is possible ?
If you can SSH into each computer —which I think is going to be a basic requirement for any answer here— you can ping off a
dbus
command to shut down each desktop machine. You might need to tweak permissions (also shown in that question and its answers).All we need to do then is loop that for each computer. Here's an example.
Unless you've set up SSH-key authentication, you're going to have to provide a password for each iteration. Take my advice, set up key-based authentication.
And finally just in case you don't understand the syntax,
192.168.0.{10,15,52,62,12}
is a Bash expansion which will expand to:You could list full IPs if you wanted to instead. No need to quote them.
Try using something like gsh, setup your hosts within /etc/ghosts and then do an ssh key exchange.
Then your command would look something like: gsh init 0