/etc/init.d/ssh stop doesn't work (sshd just won't die)

Bug #617515 reported by Andrew Todd
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
openssh (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

I discovered yesterday that my system still had an sshd process spawned at boot, despite my having turned off the ssh service with rcconf quite a while ago. Moreover, killing this process with "/etc/init.d/ssh stop" resulted in an immediate respawn (with no complaints from the script that this is no longer the preferred way to do things).

Some self-education about Upstart followed. It looks like the settings in /etc/init/ssh.conf are overriding user settings made through the legacy rc system.

Please also reference this thread: http://ubuntuforums.org/showthread.php?t=1551949

(Also, what is the best way to disable sshd at boot under Upstart?)

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: ssh 1:5.3p1-3ubuntu4
ProcVersionSignature: Ubuntu 2.6.32-24.39-generic 2.6.32.15+drm33.5
Uname: Linux 2.6.32-24-generic x86_64
Architecture: amd64
Date: Fri Aug 13 13:50:25 2010
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, user)
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: openssh

Revision history for this message
Andrew Todd (at-drinian) wrote :
Changed in openssh (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

As far as I can tell, I don't see anything in the maintainer scripts or upstart job that respects the existing rc settings upon upgrade.

It seems that it would be a worthy tool, and not hard to do, to run something that will modify the upstart job to start on the same run levels as the rc settings during the postinst script.

One way to disable it is to simply edit /etc/init/ssh.conf to 'start on never'

Of course, if something generates a 'never' initctl event, ssh will start.

Revision history for this message
Andrew Todd (at-drinian) wrote :

Thanks for the advice -- if I wanted more of a guarantee, I would create the /etc/ssh/sshd_not_to_be_run file. As it is, I still use sshd occasionally. Let me know if you need anything else from me.

Revision history for this message
Thierry Carrez (ttx) wrote :

Linked to bug 531912

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.