http://www.perlmonks.org?node_id=160015


in reply to execute a program / cgi

Since this was a "blunder", perhaps it's a one-time problem? You already know that you don't want to do this sort of thing. Perhaps instead of trying to restart sshd via a CGI script, you'd be better served to work to ensure that this sort of blunder cannot re-occur and address restarting them using an entirely different (and secure) method in case it somehow happens again?

Seems solving it this way would just be compounding the blunder, not alleviating it!

Replies are listed 'Best First'.
Re: Re: execute a program / cgi
by nlafferty (Scribe) on Apr 17, 2002 at 21:42 UTC
    suggestions? I have ftp and apache running. My first though was to upload into cron.hourly but root isn't allowed to log in to ftp. Not a perl question anymore, but you must have some other methods in mind :) thanks

      Sounds like you have only remote access to the box? or is this just a case where you are trying to get a one-time problem resolved in short-time, and can get to it later?

      Based on my SA skills (which is not professional) I would say you either have to get local access to the box, or contact an SA who can to restart the daemon. If the box is properly locked down methinks you should only be able to restart this locally. period.

        That's right, I only have remote access. I am the a learning SA. Learning more now than ever. A faultly shell script that I wrote killed sshd but did not restart it. I just want to save the head engineer some head ache in going to the box and doing it.