Simplest way:
(1)
Code:
ssh root@rometesite -c "halt"
Better:
(2)
Code:
ssh user@remote
bash ~/ > sudo halt
(enter password)
Nifty but dumb (every local user /every body with write permissoin to /tmp can shutdown your computer):
(3)
Code:
- create script which:
- checks for file /tmp/shutdown.txt
- if file exists do shutdown
- else NOP
Put script in roots crontab
Server
(4)
Code:
- 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
(5)
Add some authentication to (4)
(6)
If you look at it the right way, you will see that (5) is basicly (2) but very primitive.
(7)
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!"
Happy hacking