somedude Posted June 10, 2004 Report Share Posted June 10, 2004 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] Quote Link to comment Share on other sites More sharing options...
Qchem Posted June 11, 2004 Report Share Posted June 11, 2004 Could you not do this via ssh, using an ssh passkey to log into the unix box from windows? Quote Link to comment Share on other sites More sharing options...
somedude Posted June 11, 2004 Author Report Share Posted June 11, 2004 (edited) 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 June 11, 2004 by somedude Quote Link to comment Share on other sites More sharing options...
Gowator Posted June 11, 2004 Report Share Posted June 11, 2004 also there is a UPS monitoring package (forget the name but search in add software) that might be more appropraite. Quote Link to comment Share on other sites More sharing options...
somedude Posted June 11, 2004 Author Report Share Posted June 11, 2004 @Gowator, That would have been too easy... My problem is that I can't connect the UPS to the server as it requires USB. Quote Link to comment Share on other sites More sharing options...
Gowator Posted June 11, 2004 Report Share Posted June 11, 2004 /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. Quote Link to comment Share on other sites More sharing options...
somedude Posted June 11, 2004 Author Report Share Posted June 11, 2004 /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. Quote Link to comment Share on other sites More sharing options...
somedude Posted June 15, 2004 Author Report Share Posted June 15, 2004 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.... Quote Link to comment Share on other sites More sharing options...
somedude Posted June 18, 2004 Author Report Share Posted June 18, 2004 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.