sshd wont start because of hosts.allow and hosts.denyssh
|Reported by:||yggdrasil||Owned by:||kris|
|Keywords:||sshd ssh_exchange_identification Connection closed remote host||Cc:||trac-bugs@…|
I ran into a problem running sshd on my machine with my 9.2-RELEASE. On earlier versions it was sufficient to add a pf rule, add sshd_enable="YES" to rc.conf.local and just service sshd start.
In my current 9.2 install, I also had to remove the example hosts.allow and hosts.denyssh files in /etc for sshd to not disallow remote connections. Although hosts.denyssh is empty, with it outside connections would fail with a
ssh_exchange_identification: Connection closed by remote host
Without it everything works as expected.