So While I've been looking into ways of locking down users and locking them down into jails. I've came across an interesting question that I haven't seen answered anywhere.
How can one posses the power to jail the root account? I'm trying currently with the following:
Match user root ChrootDirectory /opt/somedirectory/anotherdirectory ForceCommand internal-sftp
But I keep getting disconnected upon connection. - For this use case since its a lab environment I have allowed PasswordAuthentication and PermitRootLogin.
I understand that Chroot jails use the superuser permissions in order to lock people in their own little environments. But is there something can can jail root? Or at least lock him down to a specific directory so he can't cd back? Its an interesting case I'd like to explore and learn more about! Thanks for your time in answering!
TL;DR: How can you sftp jail a root to a specific directory.