sshd never restarts

Noah admin2 at enabled.com
Sat Jan 27 20:07:40 UTC 2007


Hi there,

FreeBSD 4.9
openssh-3.6.1_6


so I have a script /usr/local/etc/rc.d/sshd.sh  that I use to restart sshd

but sshd most of the time never comes back.

there is nothing relevant that makes it to /var/log/messages

if I start sshd manually with /usr/local/etc/rc.d/sshd.sh there are no 
error messages. My /etc/ssh/sshd_config configuration is fine and has no 
errors.

how can I assure that sshd restarts each time?  when I am remote to the 
machine.  I am locked out of it.

--- snip ---

# cat /usr/local/etc/rc.d/sshd.sh
#!/bin/sh
#
# $FreeBSD: ports/security/openssh/files/sshd.in,v 1.1 2006/06/09 
21:54:03 pav Exp $
#
# PROVIDE: sshd
# REQUIRE: NETWORKING SERVERS USR
# BEFORE: LOGIN
#
# Add the following lines to /etc/rc.conf to enable sshd
#
# sshd_enable (bool):   Set to "NO" by default
#                       Set it to "YES" to enable sshd

. /usr/local/etc/rc.subr

name="sshd"
rcvar=${name}_enable

load_rc_config ${name}

: ${sshd_enable="NO"}
: ${sshd_pidfile="/var/run/sshd.pid"}

command="/usr/local/sbin/${name}"

run_rc_command "$1"

# grep ssh /etc/rc.conf
sshd_enable="YES"


---- snip ---




More information about the freebsd-questions mailing list