sshd refuses connections until I restart the daemon

thor thor at
Thu May 10 00:43:16 UTC 2018

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 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?

More information about the freebsd-questions mailing list