0

After I used "kill -9 3274" to terminate sshd(PID:3274), I find sshd is still running,

ps aux | grep sshd
root  3274  0.0  0.0   5728   510 ?    Ss   Jul21   0:00 /usr/sbin/sshd

however, "service sshd status" displays,

sshd is stopped

I try to restart sshd now, but it can't restart itself. How can I start sshd now? (I can't reboot the server)

UPDATE:

I issued the kill command as root, and found sshd.pid doesn't exist under /var/run/. However, 'ps aux | grep sshd' displays sshd is always running.

2
  • "kill -9 3274" really should have worked. Stupid question, are you sure you issued the command as root? Aug 5, 2011 at 19:49
  • If in fact sshd is running, but the service command returns that it is not (and you are running the commands with root privileges), you may want to check your init script for sshd.
    – user87664
    Aug 5, 2011 at 20:13

2 Answers 2

0

The state is "suspended" so send it a SIGCONT first before killing it (softly with HUP should be enough).

0

The -9 or KILL signal should immediate cause the processed to be removed from the actively scheduled list of processes, so that process should cease to exist unless the system failed to clear it up.

In this case, ps shows an S flag, which by man means

S    Interruptible sleep (waiting for an event to complete)

so it's probably locked or even dead locked.

You can trying finding out which event it is waiting for (IO? Network?) or just reboot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.