LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-08-2010, 04:29 AM   #1
user100
Member
 
Registered: Aug 2010
Posts: 64

Rep: Reputation: 0
Remote shutdown deamon/utility


Hi,

Is there something like a remote shutdown daemon or utility for slackware available?

Something without having to log in and halt the system.
Like something you can combine with a windows system, or linux.



Thanks.
 
Old 11-08-2010, 09:37 AM   #2
em21701
Member
 
Registered: Feb 2008
Location: Rhode Island, USA
Distribution: Slackware12.2 & Slackware64-current
Posts: 265

Rep: Reputation: 40
I'm not quite sure what you are asking for but you could try this from any linux machine and it will shut down the machine at the ip address you enter.
Code:
ssh root@<ip-address> halt
 
Old 11-08-2010, 10:05 AM   #3
Gavin Harper
Member
 
Registered: Feb 2010
Location: Finland
Distribution: Slackware
Posts: 169

Rep: Reputation: 24
I will add to this and say from Windows you can install openssh client (works from cmd.exe like linux ssh) and / or PuTTY to remote "anything" on the linux box.
 
Old 11-09-2010, 05:48 AM   #4
user100
Member
 
Registered: Aug 2010
Posts: 64

Original Poster
Rep: Reputation: 0
Yes but its not for me.

I mean something like a daemon running on the slackware server and a simple "click app" for windows which will send the command or whatever to shut it down.
 
Old 11-09-2010, 01:19 PM   #5
Slax-Dude
Member
 
Registered: Mar 2006
Location: Valadares, V.N.Gaia, Portugal
Distribution: Slackware
Posts: 528

Rep: Reputation: 272Reputation: 272Reputation: 272
Quote:
Originally Posted by user100 View Post
Yes but its not for me.

I mean something like a daemon running on the slackware server and a simple "click app" for windows which will send the command or whatever to shut it down.
You can use putty together with a simple script, and you'll have your clicky thingy that shuts down a linux box, provided such linux box is running sshd.

Make a text file (let's name it "poweroff_linux_box.txt") in the same directory as putty.exe and put the following in it:
Code:
poweroff
Now, make a text file named clicky_thingy.bat and put the following in it:

Code:
putty.exe -pw somepass -m poweroff_linux_box.txt someuser@someipaddress
Note1: replace the following with your own data
someipaddress = the ip address for your linux box
someuser = the username you use to login to your linux box
somepass = the password for the username you use to login to your linux box

Note2: this is EXTREMELY insecure, as the user + pass for your linux box are there in clear text for anyone to see and exploit. Use it at your own risk.

That's it... click away...

Last edited by Slax-Dude; 11-09-2010 at 01:21 PM.
 
Old 11-09-2010, 01:25 PM   #6
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
Quote:
Originally Posted by user100 View Post
Yes but its not for me.

I mean something like a daemon running on the slackware server and a simple "click app" for windows which will send the command or whatever to shut it down.
yes but the whole point of making you log in/authenticate before shutting down the machine instead of having a simple 'button' to 'shut down' the machine is so that just anyone cant walk up and push that button and remotely shut down your machine when you least expect it. it's a trade off between security and simplicity and unlike with M$ and window$ that often will dummy down something to the point where it does away with quite a bite of security, with Linux security often takes a higher precedence over simplicity, be thankful there isnt a simple loophole in your server to simply click a button to remotely shut down your server without having to authenticate yourself

Last edited by frieza; 11-09-2010 at 01:28 PM.
 
Old 11-09-2010, 09:35 PM   #7
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
Quote:
Originally Posted by Slax-Dude View Post
Note2: this is EXTREMELY insecure, as the user + pass for your linux box are there in clear text for anyone to see and exploit. Use it at your own risk.
Probably safer to use ssh keys with putty. No plain-text login info revealed. Still not completely secure since someone could copy that file, but it's certainly better than using a plain-text password.

The best option is to use Slax-Dude's approach, using a *regular user* to login via ssh (via an ssh key preferably). You can then run `sudo shutdown -h now` assuming your sudoers file is setup properly to allow that command to be run without requiring a password.
 
Old 11-10-2010, 12:51 AM   #8
user100
Member
 
Registered: Aug 2010
Posts: 64

Original Poster
Rep: Reputation: 0
Thanks Slax-Dude and the other posters, that will work I think.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: rsnapshot - Local/Remote Filesystem backups utility in openSUSE LXer Syndicated Linux News 0 10-06-2008 07:41 PM
Disk might not be spun down properly. Update shutdown utility adityavpratap Debian 14 11-14-2007 01:58 AM
Remote shutdown? Zinghung Linux - Networking 7 07-08-2005 06:59 AM
Remote Shutdown Spyder_Snyper Linux - Networking 1 01-24-2005 08:49 PM
Remote shutdown Tarantismic Yak Linux - Security 1 06-04-2001 09:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration