PDA

View Full Version : [ubuntu] Remote Shutdown of networked Ubuntu PC's



Linuxson25
September 2nd, 2010, 07:57 AM
Hi

I will be running a network of +- 35 Ubuntu pc's from next year on. I have already started setting up remote desktop viewing utilities, but I now need a way to remotely shut down all the pc's at the same time, with a simple command as Admin. Setting up scripts to execute at a certain time is not gonna help, as the online time wont be the same all the time. I want to avoid having to remotely shut down each and every pc, as this will take quite a lot of time. Any help will be greatly appreciated

Thanx

BkkBonanza
September 2nd, 2010, 08:55 AM
One option, you could look into pssh (Parallel ssh) - this is ssh for multiple machines at once. It's in the repos.

http://www.theether.org/pssh/docs/0.2.3/pssh-HOWTO.html

pssh -h hostlist sudo poweroff

ClusterSSH another similar option.

You would want to use keys to authenticate either way.

Linuxson25
September 4th, 2010, 02:07 PM
One option, you could look into pssh (Parallel ssh) - this is ssh for multiple machines at once. It's in the repos.

http://www.theether.org/pssh/docs/0.2.3/pssh-HOWTO.html

pssh -h hostlist sudo poweroff

ClusterSSH another similar option.

You would want to use keys to authenticate either way.
Thanx, I will definitely give it a try. Will only be able to give feedback by about end Jan next year :)

dE_logics
September 4th, 2010, 03:40 PM
Using SSH make a shell script -


ssh user@x.x.x.x < file
ssh user@x.x.x.x < file
ssh user@x.x.x.x < file

The file contains
halt;exit

I don't remember the format... sorry.