dtruss shows:
2892/0xdc8e: stat64("/usr/lib/libsandbox.1.dylib\0", 0x7FFF500DA5F0, 0x7FFF500DB500) = -1 Err#2
which is ENOENT (No such file or directory) and the reason is probably that chroot already happened. If you are so foolish as to experiment by
sudo mkdir -p /var/empty/usr/lib
sudo cp /usr/lib/libsandbox.1.dylib /var/empty/usr/lib
You will move the crash to the next shlib not under /var/empty/
sshd[3256]: fatal: ssh_sandbox_child: sandbox_init: dlopen (/usr/lib/libsandbox.1.dylib, 261):
Library not loaded: /usr/lib/libsqlite3.dylib\\n Referenced from: /usr/lib/libsandbox.1.dylib\\n Reason: image not found [preauth]
If you persist with this madness
sudo cp /usr/lib/libsqlite3.dylib /usr/lib/libMatch.1.dylib /var/empty/usr/lib/
sshd will start to work again at least for SSH keys, passwords still don't work.
You can also edit /usr/local/etc/sshd_config
changing
UsePrivilegeSeparation sandbox
into
UsePrivilegeSeparation yes
But outside of debugging purposes I don't suggest trying any of this.
I had the same problem and found the answer here: Mavericks update broke ssh key-based authentication
Basically, you can't use authorized_keys2 anymore (an old default). Rename the file to "authorized_keys" and it should work again (it did so for me).
mv ~/.ssh/authorized_keys2 ~/.ssh/authorized_keys
Best Answer
/etc is a link to /private/etc, so /etc/ssh/sshd_config and /private/etc/ssh/sshd_config are the same file.
The default sshd_config file in macOS 10.12 looks like this:
File permissions: