-
Create a bin directory in jail and copy /bin/sh to this directory.
-
Because sh binary is dynamically linked to shared libraries, you need to copy these libraries into jail /lib as well. Use otool to display the shared libraries dependencies, and copy the necessary libraries.
-
Also copy /usr/lib/dyld to your chroot jail to get the dynamic linker. If that is not present, then attempting to execute anything in the chroot jail will fail without any error other than Killed: 9
Setting Up a Chroot user/group for SSH
Mac OS X El Capitan Installer Removes Custom Group ID And Membership