From owner-freebsd-questions@freebsd.org Thu May 10 01:49:37 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17C49FD2F73 for ; Thu, 10 May 2018 01:49:37 +0000 (UTC) (envelope-from bferrell@baywinds.org) Received: from baywinds.org (50-196-187-248-static.hfc.comcastbusiness.net [50.196.187.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "baywinds.org", Issuer "rr-v" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 941A569FF6 for ; Thu, 10 May 2018 01:49:36 +0000 (UTC) (envelope-from bferrell@baywinds.org) Received: from [192.0.2.130] (rr-iii [192.0.2.130]) by baywinds.org (8.14.4/8.14.4) with ESMTP id w4A0v3Ja006620 for ; Wed, 9 May 2018 17:57:04 -0700 Subject: Re: sshd refuses connections until I restart the daemon To: freebsd-questions@freebsd.org References: From: Bruce Ferrell Message-ID: Date: Wed, 9 May 2018 17:57:03 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2018 01:49:37 -0000 On 05/09/2018 04:01 PM, Patrick McMunn wrote: > I sometimes access my FreeBSD 11.1-RELEASE-p9 box from my laptop via ssh. > Sometimes I can connect, but sometimes I get the message "ssh: connect to > host 192.168.0.71 port 22: Connection refused". But if I walk over to the > computer and manually restart the sshd daemon, I can then go back to my > laptop and successfully ssh into the FreeBSD box. Why would it stop > accepting ssh connections until restarting the daemon, and how can I fix > this from recurring? > Patrick, There are a couple of entries that could be in sshd_config that might create this effect: MaxSessions: 10 is default; other values do interesting things MaxStartups:  default is 10:30:100; see the man page for sshd_config as it get's a wee touch detailed Regards