The current init script will not try to restart the daemon if
everything does not exit cleanly. We already know that the main
process won't exit cleanly since it was manually killed.

Unless you are comfortable editing the init script I would suggest:

1) Type:
ps auxww |grep /usr/sbin/sshd |grep -v grep

This will give you the process id of the current sshd daemon. Write it
down for later use.

2) On the following page, do steps 1 and 2 (I know this article is
specifically related to upgrading sshd on redhat, but these steps are
the same for gentoo):

http://www.hackinglinuxexposed.com/articles/20020319.html

This will give you a temporary sshd server, so that we can kill off
all of your old sshd process, while still giving you access to the
machine.

It will also make sure that there are not any configuration problems
with your current sshd_config file that are preventing the daemon from
starting.

If this copy of sshd daemon won't start then we know the problem is a
configuration error or that the binary somehow became corrupted.

3) Kill off the current sshd process from step 1
kill -TERM sshd_pid
  -- or --
kill -KILL sshd_pid

4) Type:
/etc/init.d/sshd zap

DO NOT USE the stop or restart commands - they will kill off your
temporary ssh server from step 2

5) Type:
/etc/init.d/sshd start

6) Try connecting to your server as you normally would. If everything
is working, then your can kill off the ssh daemon running on the
alternate port.

If it still doesn't start then its off two round three problem solving...

-Good Luck, Stephen

On 9/10/07, Grant <[EMAIL PROTECTED]> wrote:
> > For Grant:
> > I reread the init script for sshd, and I know see what was most likely
> > the problem. The init script, now, tries to kill all instances with
> > the process name of sshd, not just the daemon (as specified by the pid
> > file). This is why you were locked out when trying to restart the
> > daemon. If you can restart the machine, everything should be working
> > fine after a reboot. This behavior differs from every other distro of
> > linux that I have used, and with previous versions of the init script.
> > Sorry I missed that before emailing the list last time.
>
> That's alright, I really appreciate your attention.  One thing though.
>  Your init script discovery doesn't explain why sshd wouldn't restart
> (stop actually) when I was logged in does it?  Given that, do you
> still think restarting is the way to go?  I'm just trying to make sure
> I don't restart and still not have access.  That would be bad because
> there is a crucial daemon running now that won't come up
> automatically.
>
> Please tell me what you think.
>
> - Grant
> --
> [EMAIL PROTECTED] mailing list
>
>
-- 
[EMAIL PROTECTED] mailing list

Reply via email to