Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Shutdown Tool
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
bobber205
Guru
Guru


Joined: 23 Aug 2006
Posts: 561
Location: Oregon

PostPosted: Tue Aug 21, 2007 11:37 pm    Post subject: Shutdown Tool Reply with quote

You guys have heard of Wake on Lan right?

Well, is there anything like it for shutting down a machine on lan? ;)

I know what you're thinking... ssh in and so a shutdown command.

I need to be able to shut down windows boxes from the terminal based on hostname. :)
Back to top
View user's profile Send private message
Voltago
Advocate
Advocate


Joined: 02 Sep 2003
Posts: 2593
Location: userland

PostPosted: Tue Aug 21, 2007 11:56 pm    Post subject: Reply with quote

Install ssh server on the windows machine (e. g. from openssh.org or tectia.com or with cygwin), find a way to shut down windows from a DOS prompt, and you're set.

EDIT: Forget tectia.com, they offer only trial versions for free.
EDIT2: Forget also openssh.org, they don't offer packages for windows, there is a project that does that on sourceforge, but they're badly outdated. So cygwin it is, I guess...
Back to top
View user's profile Send private message
ToeiRei
Veteran
Veteran


Joined: 03 Jan 2005
Posts: 1191
Location: Austria

PostPosted: Wed Aug 22, 2007 8:58 am    Post subject: Reply with quote

I am using APC tools here to do so. - UPS stuff simulating a power failure. The clients are shutting down as they assume, battery's low at the UPS.

Rei
_________________
Please stand by - The mailer daemon is busy burning your messages in hell...
Back to top
View user's profile Send private message
ok
Guru
Guru


Joined: 11 Jul 2006
Posts: 390
Location: germany

PostPosted: Wed Aug 22, 2007 4:23 pm    Post subject: Reply with quote

If your LAN is save, you can use telnet. Activate the service on the windows computer (it is installed by default), then you can use:
# shutdown -s -t xx
xx is the time in seconds.
If some one know how this can be done automatic, i am interested in it...
Back to top
View user's profile Send private message
Corona688
Veteran
Veteran


Joined: 10 Jan 2004
Posts: 1204

PostPosted: Wed Aug 22, 2007 5:30 pm    Post subject: Reply with quote

Something like
Code:
echo "command" | telnet computer
maybe?
_________________
Petition for Better 64-bit ATI Drivers - Sign Here
http://www.petitiononline.com/atipet/petition.html
Back to top
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Wed Aug 22, 2007 6:03 pm    Post subject: Reply with quote

try this: http://users.pandora.be/jbosman/poweroff/poweroff.htm
Quote:
You can remotely control poweroff by starting it as a service and setting the ‘Allow remote control’ option. You can control it by using poweroff itself and selecting a remote computer, or you can control it by using telnet to the port where poweroff listens on (default 3210).

_________________
Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself
Back to top
View user's profile Send private message
ok
Guru
Guru


Joined: 11 Jul 2006
Posts: 390
Location: germany

PostPosted: Wed Aug 22, 2007 7:22 pm    Post subject: Reply with quote

Corona688 wrote:
Something like
Code:
echo "command" | telnet computer
maybe?

This does not work:
echo "pw" | telnet -a host
...
Connection closed by foreign host.
Back to top
View user's profile Send private message
Mben
Guru
Guru


Joined: 29 Mar 2004
Posts: 465
Location: New York, USA

PostPosted: Wed Aug 22, 2007 10:36 pm    Post subject: Reply with quote

I think it can be done with rpcclient (part of samba)

something like
Code:

rpcclient -U user computer
[password]
shutdown


But I'm not sure and don't have a windows machine handy. Check the rpcclient man page around line 222
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum