From owner-freebsd-bugs@FreeBSD.ORG Sun Oct 16 16:00:24 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB1D7106564A for ; Sun, 16 Oct 2011 16:00:23 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id BC8AF8FC14 for ; Sun, 16 Oct 2011 16:00:23 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GG0NrH084625 for ; Sun, 16 Oct 2011 16:00:23 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p9GG0Nab084615; Sun, 16 Oct 2011 16:00:23 GMT (envelope-from gnats) Resent-Date: Sun, 16 Oct 2011 16:00:23 GMT Resent-Message-Id: <201110161600.p9GG0Nab084615@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, John Blazek Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9279E106564A for ; Sun, 16 Oct 2011 15:50:41 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 68BD38FC0A for ; Sun, 16 Oct 2011 15:50:41 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GFoe8e039111 for ; Sun, 16 Oct 2011 15:50:40 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p9GFoeMj039110; Sun, 16 Oct 2011 15:50:40 GMT (envelope-from nobody) Message-Id: <201110161550.p9GFoeMj039110@red.freebsd.org> Date: Sun, 16 Oct 2011 15:50:40 GMT From: John Blazek To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/161714: SSHD starts on boot even if sshd_enable="NO" in 8.2 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 16:00:24 -0000 >Number: 161714 >Category: misc >Synopsis: SSHD starts on boot even if sshd_enable="NO" in 8.2 >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Oct 16 16:00:23 UTC 2011 >Closed-Date: >Last-Modified: >Originator: John Blazek >Release: 8.2 >Organization: >Environment: >Description: Followup to previous report: After tracking this down further, it appears to be directly related to an entry in /etc/rc.local /usr/sbin/sshd -p 22200 This entry is intended to start a separate instance of sshd for administrator access. When this entry is commented out with hash #, no sshd process starts. When the hash is removed, sshd starts on both port 22200 and port 9991 *BOOTED WITH #/usr/sbin/sshd -p 22200 in rc.local [root@kahlua]:[~]# cat /etc/rc.local #/usr/sbin/sshd -p 22200 sysctl kern.securelevel=2 result: no sshd running. inetd listening on 2220 [root@kahlua]:[~]# sockstat | grep ssh [root@kahlua]:[~]# sockstat | grep 2220 root inetd 45432 5 tcp4 *:2220 *:* [root@kahlua]:[~]# Then manually executing the command starts sshd as expected: [root@kahlua]:[~]# /usr/sbin/sshd -p 22200 [root@kahlua]:[~]# sockstat | grep ssh root sshd 56999 3 tcp6 *:22200 *:* root sshd 56999 4 tcp4 *:22200 *:* [root@kahlua]:[~]# ************************************************************************* Removed Hash from rc.local, to start copy of ssh on port 22200 [root@kahlua]:[~]# cat /etc/rc.local /usr/sbin/sshd -p 22200 sysctl kern.securelevel=2 [root@kahlua]:[~]# This resulted in an 'extra' copy of sshd starting (using the flag -p 9991 from rc.conf) [root@kahlua]:[~]# cat /etc/rc.conf | grep ssh # sshd is controlleb by inetd sshd_enable="NO" sshd_flags="-p 9991" [root@kahlua]:[~]# sockstat | grep ssh root sshd 33493 3 tcp6 *:9991 *:* root sshd 33493 4 tcp4 *:9991 *:* root sshd 7532 3 tcp6 *:22200 *:* root sshd 7532 4 tcp4 *:22200 *:* [root@kahlua]:[~]# sockstat | grep 2220 root inetd 49601 5 tcp4 *:2220 *:* root sshd 7532 3 tcp6 *:22200 *:* root sshd 7532 4 tcp4 *:22200 *:* >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: