When running sshd from /etc/rc.local, another sshd process is being spawned. It looks like /etc/rc.d/sshd was also being executed even it was not enabled in /etc/rc.conf.
/root/ssh/sshd_config is configured to listen using port 2525.
sockstat shows two active listening sshd.
Anybody has experienced this issue?
As a work around fix, I did
Code:
#cat /etc/rc.conf
# Created: Wed Mar 30 00:55:59 2011
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
sshd_enable="NO"
Code:
# cat /etc/rc.local
/usr/sbin/sshd -f /root/ssh/sshd_config -h /root/ssh/ssh_host_rsa_key
/root/ssh/sshd_config is configured to listen using port 2525.
sockstat shows two active listening sshd.
Code:
# sockstat -4L
root sshd 1196 4 tcp4 *:22 *:*
root sshd 1114 4 tcp4 *:2525 *:*
Code:
# ps -aux | grep sshd
root 1114 0.0 0.1 26260 4412 ?? Ss 12:42PM 0:00.01 /usr/sbin/sshd -f /root/ssh/sshd_config -h /root/ssh/ssh_host_rsa_key
root 1196 0.0 0.1 26260 4824 ?? Is 12:42PM 0:00.00 /usr/sbin/sshd
Code:
# uname -a
FreeBSD 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
Anybody has experienced this issue?
As a work around fix, I did
chmod -x /etc/rc.d/sshd
to disable execution mode.