ssh_exchange_identification: Connection closed by remote host
mouss at netoyen.net
Sat Mar 8 13:22:06 PST 2008
Dag-Erling Smørgrav wrote:
> mouss <mouss at netoyen.net> writes:
>> I found the problem:
>> fatal: /var/empty must be owned by root and not group or world-writable.
>> I have created an account and set the home to /var/empty, but this
>> changed the owner of /var/empty. sigh.
> There is no need to create an account.
there is a need:)
just to clarify: I created an account for another service, and I
mistakenly "reused" the empty /var/empty, but adduser changed the owner
of this directory to the newly created user. thus the problem.
If I could make some suggestions:
- add a "fix" in /etc/rc.d/sshd to prevent such situations. if a chown
is risky, then moving the directory and recreating it would do.
- add a warning in the documentation
- don't change owner in addusr if directory already exists
> Also, 'cd /usr/src; make hierarchy' would have fixed it for you.
thanks for the pointer. but I think an automatic fix is needed as losing
ssh access is critical when the machine is far away.
More information about the freebsd-current