ssh root@rometesite -c "halt"
bash ~/ > sudo halt
Nifty but dumb (every local user /every body with write permissoin to /tmp can shutdown your computer):
- create script which:
- checks for file /tmp/shutdown.txt
- if file exists do shutdown
- else NOP
Put script in roots crontab
- create some kind of socket listner server, listing on som port
- connect to server, put message in socket stream
- if message is "shutdown" do shutdown
Add some authentication to (4)
If you look at it the right way, you will see that (5) is basicly (2) but very primitive.
Combine any of the above...
user your imagination:
What you basicly want ist to dispatch a message from computer Remote1 to computer remote2.
If message correct, then Remote2 must do shutdown.
In stead of ssh you could use HTTP, FTP, SFTP, SMTP or whatever other protocol to comunicate.
"Free your mind, and the rest will follow!"