cm2k Posted April 21, 2006 Report Share Posted April 21, 2006 Hi, I have the Linux box working great now :D - thanks for everyones help :) I just have one last hurdle to conquer, I have the box connected to a UPS however there is no serial cable so it cannot tell when it has gone to battery. I have a script that sends a shutdown command to a Windows 2003 box on the same UPS and that works great I need a similar way to do this with Linux. I have looked at SSH, but couldn't get the script to work without needing me to enter the password. I am now trying RSH, but keep getting Access Denied, or when I run RSH -L Linux Shutdown the DOS Screen just sits there with RSH.exe running doing nothing. I have enabled RSH in RSH script, and added my IP to the Host.allow. Am I missing anything? Or does anybody have a better way to fireoff the shutdown script from a Windows box? Thanks again :) [moved from Software by spinynorman] Quote Link to comment Share on other sites More sharing options...
ddmcse Posted April 21, 2006 Report Share Posted April 21, 2006 (edited) Name: apcupsd Version: 3.10.18-3mdk Architecture: i586 Size: 9274 KB Summary: Power management software for APC UPS hardware sounds like an old UPS and you have 2 PC's on it ? Edited April 21, 2006 by ddmcse Quote Link to comment Share on other sites More sharing options...
cm2k Posted April 21, 2006 Author Report Share Posted April 21, 2006 Name: apcupsdVersion: 3.10.18-3mdk Architecture: i586 Size: 9274 KB Summary: Power management software for APC UPS hardware sounds like an old UPS and you have 2 PC's on it ? Hi, No it's quite a new one, we just don't have the cables to connect them through serial, and I cannot get any spend to go get some :( So I have to make the best of what I have got. Quote Link to comment Share on other sites More sharing options...
pmpatrick Posted April 21, 2006 Report Share Posted April 21, 2006 I have looked at SSH, but couldn't get the script to work without needing me to enter the password. You can solve that problem by generating an ssh key. Here's a nice tutorial on ssh that goes into the process in some detail: http://www.suso.org/docs/shell/ssh.sdf That's doing it from a local linux box to a remote linux box. There should be a similar procedure for doing this in a mixed windows/linux environment but I'm not that familiar with ssh configuration in windows. If you're using putty, here's some info on key authentication in windows: http://www.tartarus.org/~simon/puttydoc/Chapter8.html#pubkey The idea is to use the generated keys as the method of authentication instead of user passwords. Once it's set up, you can automaically login without giving the password. Quote Link to comment Share on other sites More sharing options...
cm2k Posted April 21, 2006 Author Report Share Posted April 21, 2006 Thanks for that, I have configure SSH and it is using Public/Private Keys now howver the only problem is that it now asks me for the passphrase each time. If I made a Public Key/Private Key with no passphrase would this get around it? How can I get around this, I need it to login and fire off the the shutdown command Quote Link to comment Share on other sites More sharing options...
cm2k Posted April 21, 2006 Author Report Share Posted April 21, 2006 Never mind - I got it working now :) I used blank passphrases and called Putty from the command line with the switches, shuts Linux down great - Am going to add it to my larger script and test it now :) Thanks for the help guys, much appreciated Quote Link to comment Share on other sites More sharing options...
Qchem Posted April 21, 2006 Report Share Posted April 21, 2006 I think using the keychain script may help here if you want the security of having passphrases (I would advise it). 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.