Tuesday, October 13, 2015

Unable to SSH into a remote Mac: ssh_exchange_identification: Connection closed by remote host

When attempting to SSH into a remote Mac running 10.10.5, Terminal returned the following error:

ssh_exchange_identification; Connection closed by remote host

On the target machine we checked the Console log and found that during each SSH login attempt an error would appear in the log:

sshd: fatal: /var/empty must be owned by root and not group or world-writable.

We changed the ownership on the /var/empty folder:

sudo chown -R root:staff /var/empty

And we were then able to SSH to the remote computer.

No comments: