Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 May 2018 08:42:41 +0800
From:      thor <thor@irk.ru>
To:        freebsd-questions@freebsd.org
Subject:   Re: sshd refuses connections until I restart the daemon
Message-ID:  <19d2f225-02b4-7d69-9a12-3ea382be73a7@irk.ru>
In-Reply-To: <CAKS%2Bcu2aSY4qnoOVpNs-T6bELBpf5eJAG4GihRkzEEDOqkAXhA@mail.gmail.com>
References:  <CAKS%2Bcu2aSY4qnoOVpNs-T6bELBpf5eJAG4GihRkzEEDOqkAXhA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Well, as I understand, there are 2 things:

1) The existing ssh daemon stops responding for unknown reasons while 
still running,

2) There is a mechanism to start daemons via inetd, and there are sshd 
lines commented out in it's config.

So you could try (I didn't try so the recommendation is purely 
theoretical) uncomment sshd in /etc/inetd.conf, comment out 
sshd_enable='YES" in /etc/rc.conf, add inetd_enable="YES" in 
/etc/rc.conf (if not added) and reboot. It should create a new instance 
of sshd every time you access the computer. Hopefully the new instance 
would work.


On 05/10/18 07:01, 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?
>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19d2f225-02b4-7d69-9a12-3ea382be73a7>