Click to See Complete Forum and Search --> : shutting down remote computer via script


freakmn
07-01-2003, 03:42 AM
I would like to create a local script to run a series of commands on my machine, one of them being shutting down a remote computer. I can ssh into this remote computer and type halt, but I don't think that would work in a script. Is there any easy way to write a script to do that, and/or a tool to allow that to be done? I have physical access to both computers. Basically I want to do a system update (one command with my current distro (www.sourcemage.org), then shut down the proxy to the internet, then shut down the local computer. I want this to run unattended, so I can leave it on overnight, then it will all power down when finished. Thanks.

Greg

chrism01
07-01-2003, 10:37 AM
This is a bit lateral, but if you have the boxes running rsync, then have the src box send a file (say as triggered by cron).
Have another cron job on the tgt box, which when it sees the file does what you want, or even have the instructions inside the txfrd file, so you can do anything ie flexibility.
Note that rsync is capable of using ssh transport.