페이지

2012년 2월 10일 금요일

scheduling tasks with sshsudo

sshsudo

sshsudo

1 background

I am administering 20 build servers and i got notice form utility team that there will be power outage during the weekend. so i have to schedule power off before it to block potential physical damage to PC. before i just logged into each PC and scheduled poweroff for 20 times but this time, i want to be productive because i'm lazy.
to shedule a task at a specific time i can use at.
sudo at -f off.sh 12:00 12 Feb

2 the problems

the problem is i type in password 2 times when connects to a computer vis ssh and invokes sudo.

3 sshsudo

this tool is just awesome! sshsudo resolve the problems completely. even send the script to a destination.
sshsudo -r BA-L1,BA-L2,BA-L3,BA-L4,BA-L5,BA-L6 at -f off.sh 12:00 12 Feb
it rocks!