Jump to content

Remote shutdown without logging in


Recommended Posts

Hi everybody,

 

I have a UNIX server connected to one of the two UPS units. The other UPS is running two windoze servers. There is a USB connection from both UPS's to the domain controller (sorry - windoze), which sees them as a battery. I set the events to shutdown the server when the battery level drops below a set level. The other windoze machine works very well with this setup.

 

So far so good. I would really like to shutdown the UNIX server when a power failure lasts too long. Since the windoze server monitors the event, I could use a script to shut down the UNIX server remotely, except I don't know of a way to do it without being specifically logged on. There is no USB on the UNIX machine and I don't think SCO would be able to see it either.

 

I tried the remote shell (rsh), for which windoze has a command, but I can't get it to work, because I can't specify the password. Telnet needs an interactive password, so I can't use it. I tried adding the windoze server to /etc/hosts to no avail.

 

Since it's on a secure LAN, I don't mind sending the password across, if need be.

 

I know this is not Linux, but I would really appreciate a clue.

 

Thank you very much.

 

[moved from Networking by spinynorman]

Link to comment
Share on other sites

If I knew what that means... :) Just kidding, I will do some reading, I've never used ssh. Your post leads me to believe that there are ssh tools in windoze.

 

Thanks for the advice.

 

Update: oops, looks like my SCO server doesn't have ssh. I can get open ssh for both, but I was hoping there's an easier way.

Edited by somedude
Link to comment
Share on other sites

/me slaps myself in face with wet fish

 

ouch...

 

erm Im learning to read... bear with me in the meantime...

 

so yep ssh is best....

you can use trusted hosts (/etc/hosts.allow) and an rexec or rlogin but its not really the best or any simpler than ssh.

Link to comment
Share on other sites

/me slaps myself in face with wet fish

DON"T! :)

 

Hey, I appreciate the simple fact that you took the time to reply. Thank you for that.

And thaks for the advice.

 

I know ssh is the most secure and elegant solution, but I dread having to install more stuff on both servers.

I tried rexec to no avail, even after adding the win machine in hosts.allow (which, by the way I had to create in /etc - not sure if it's because of sco 5).

rlogin also needs an explicit password, so... :(

 

Thanks again.

Link to comment
Share on other sites

Well, I know I need closure, so I figured you may want to know what's goin' on, even tho' you may not like the solution. I don't, but I was out of ideas.

 

I wrote a VB program that uses 'SendKey' to tell telnet what to do, including login info and the shutdown command. It is triggered by a battery event on the windoze server and shuts down SCO.

 

I hate it, but it's extremely simple and it's consistent with M$'s crappy way to do things....

Link to comment
Share on other sites

More Google-ing and the fact that I wanted to be a true Linux user, made me revise the process:

 

rsh -l root shutdown -g0 -y

 

did the trick, after adding the machine to /etc/hosts and creating /.rhosts with the machine name and user name in it.

 

*IX rocks!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...