From nobody@FreeBSD.org  Wed Jun  1 08:27:59 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 82F2716A41C
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  1 Jun 2005 08:27:59 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 5D0DF43D1D
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  1 Jun 2005 08:27:59 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j518Rx7O046887
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 1 Jun 2005 08:27:59 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j518RxpB046886;
	Wed, 1 Jun 2005 08:27:59 GMT
	(envelope-from nobody)
Message-Id: <200506010827.j518RxpB046886@www.freebsd.org>
Date: Wed, 1 Jun 2005 08:27:59 GMT
From: eric pretorious <eric@pretorious.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: sshd_flags='-d' causes errors
X-Send-Pr-Version: www-2.3

>Number:         81752
>Category:       misc
>Synopsis:       sshd_flags='-d' causes errors
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 01 08:30:01 GMT 2005
>Closed-Date:    Wed Jun 01 09:20:39 GMT 2005
>Last-Modified:  Wed Jun 01 09:20:39 GMT 2005
>Originator:     eric pretorious
>Release:        RELENG_4_11_0_RELEASE
>Organization:
>Environment:
FreeBSD truckee.leaguehost.net 4.11-RELEASE FreeBSD 4.11-RELEASE #0: Fri Jan 21 17:21:22 GMT 2005      
>Description:
Enabling debugging via sshd_flags (/etc/rc.conf) causes system start-up to pause (i.e., hang) until I log-in via SSH.

Once I log-out, start-up continues *but* SSH is unavailable.
>How-To-Repeat:
1. Install FreeBSD 4.11.
2. Configure SSHD to run at start-up (sshd_enable="YES").
3. Configure SSHD to log verbosely (sshd_enable="-d").
4. Complete the installation (i.e., shutdown and restart).
5. During start-up, system hangs:
  Starting standard daemons: cron sshddebug2: sshd version OpenSSH_3.5P1 FreeBSD-20030924
  debug1: private host key: #0 type 0 RSA1
  debug1: read PEM private key done: type DSA
  debug1: private host key: #1 type 2 DSA
  debug1: bind to port 22 on ::.
  Server listening on :: port 22.
  debug1: Bind to port 22 on 0.0.0.0.
  Server listening on 0.0.0.0 port 22.
  Generating 768 bit RSA key.
  RSA key generation complete.
  <<<HANG>>>
5. Log-in to the machine remotely via SSH (i.e., from a client on the LAN). e.g., `ssh me@172.16.0.2`
6. Log-out via SSH.
7. Start-up resumes.
8. Attempt to log-in to the machine remotely via SSH again:
  $ ssh 172.16.0.102
  ssh: connect to host 172.16.0.102 port 22: Connection refused

>Fix:

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: rwatson 
State-Changed-When: Wed Jun 1 09:19:04 GMT 2005 
State-Changed-Why:  
This is a documented feature of sshd(8).  Note the following from the sshd 
man page: 

-d      Debug mode.  The server sends verbose debug output to the system 
log, and does not put itself in the background.  The server also 
will not fork and will only process one connection.  This option 
is only intended for debugging for the server.  Multiple -d 
options increase the debugging level.  Maximum is 3. 

It's arguable that sshd would benefit from the separation of "increase log 
debugging" and "don't fork" debugging features, but this is a feature request 
that should be submitted to the OpenSSH maintainers, as we import OpenSSH 
from them . 


http://www.freebsd.org/cgi/query-pr.cgi?pr=81752 
>Unformatted:
