Shut down win2k workstations from linux server

Red Squirrel

No Lifer
May 24, 2003
69,667
13,312
126
www.betteroff.ca
I have a LAN with a linux server and 2 win2k workstations, I want to be able to shut down both machines and the server from the server only. Basicaly I'd have some kind of telnet program running on an obscure port and I'd enter the password and right command and it would shut down the win2k machines then shutdown the server.

I'm just wondering what is the easiest way of doing this. Is there already a way to do this, or would I have to code it all myself?
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
You could run SSH on the Windows systems. If it has a shutdown.exe command (or download it or whatever), you can then run it through SSH.

ssh username@host "shutdown.exe"
 

Red Squirrel

No Lifer
May 24, 2003
69,667
13,312
126
www.betteroff.ca
Hmm it's an option but I'm hoping for something smaller I don't want to have to run a ssh server on all machines. Kinda overkill.

Really the more I think of it,it would be easier to program the server component, so all I need to know is if there's an agent I can install on the windows machines that listens on a port and can shut down on command. Since I'll want to have the "hub" program run on my server and be accessable online, without compromizing security by having to forward a port like ssh.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: RedSquirrel
Hmm it's an option but I'm hoping for something smaller I don't want to have to run a ssh server on all machines. Kinda overkill.

Your idea was pretty insecure, so I thought I'd offer something decent. :p

Use remote desktop or something.
 

Red Squirrel

No Lifer
May 24, 2003
69,667
13,312
126
www.betteroff.ca
That's way too unsecure.

Here's how it will work.

Locally, the server will have access to shut down the machines, a password, that's about it, no encryption.

But externally the server will listen on a port for a specific packet, this packet will trigger a login screen, then once authenticated it will wait for a specific packet again, if it's the wrong one, the program shuts off. Something like that, anyway. Simply put, I only want a dedicated program to be accessable by the outside world, not an entire part of the server, such as ssh. The part I'm not sure about is the local component - the ability to shut down the windows machines from the linux ones.