misc/161710: SSHD starts on boot even if sshd_enable="NO" in 8.2
John Blazek
freebsd.org at logicalsolutns.com
Sun Oct 16 14:40:08 UTC 2011
>Number: 161710
>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 14:40:07 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: John Blazek
>Release: 8.2-RELEASE-p4
>Organization:
>Environment:
[root at kahlua]:[~]# uname -a
FreeBSD kahlua.logicalsolutns.com 8.2-RELEASE-p4 FreeBSD 8.2-RELEASE-p4 #7: Wed Oct 5 07:33:04 CDT 2011 root at kahlua.logicalsolutns.com:/usr/obj/usr/src/sys/KAHLUA i386
[root at kahlua]:[~]#
>Description:
After upgrading from 7.3 to 8.2, I found errors in my /var/log/message file indicating that inetd had a conflict.
(We run inetd to handle ssh on this machine).
After investigating I discovered that all of my 8.2 boxes are starting SSHD even though /etc/rc.conf has sshd_enable="NO"
To diagnose the issue, I added sshd_flags="-p 9991" to rc.conf and rebooted
The system booted with sshd running on port 9991
[root at kahlua]:[/usr/src]# sockstat | grep sshd
root sshd 37697 3 tcp6 *:9991 *:*
root sshd 37697 4 tcp4 *:9991 *:*
I then ran the /usr/sbin/sshd command and sshd also started on port 2220 (which is what is set in /etc/ssh/sshd_config
[root at kahlua]:[/usr/src]# /usr/sbin/sshd
[root at kahlua]:[/usr/src]# sockstat | grep sshd
root sshd 17757 3 tcp6 *:2220 *:*
root sshd 37697 3 tcp6 *:9991 *:*
root sshd 37697 4 tcp4 *:9991 *:*
(Note: inetd was running tcp4 on *:2220 per /etc/rc.conf and inetd.conf)
If I've done something wrong on my end, I don't know what it is. It appears that this same issue is impacting all of my 8.2 boxes.
>How-To-Repeat:
[root at kahlua]:[~]# cat /etc/rc.conf | grep sshd
# sshd is controlleb by inetd
sshd_enable="NO"
sshd_flags="-p 9991"
[root at kahlua]:[~]#
/etc/ssh/sshd_config
#Port 22
Port 2220
#Protocol 2
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
ps axu | grep sshd
root 37697 0.0 0.8 6712 4036 ?? Is 9:08AM 0:00.00 /usr/sbin/sshd -p 9991
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list