The idea might be stupid or not feasible, I don't know, but I can't find any reference about this...
As you may know (and as SE definitely knows!), one of the common steps used to tighten SSH security, provided file access is enough, is to lock the user in a chroot. OpenSSH has been providing such a chroot-based jail for years now.
However that approach lacks flexibility (all-or-nothing, SFTP only, etc.) and it comes down to abusing a system call (which has security implications, hence the "the jail must be owned by root" and other recommendations rarely understood).
Now that OpenSSH is provided as a
sshd@.service, I am tempted to use Linux namespace (which I get for free then) to restrain my users instead.
I am just very surprise that I found literally nothing on that alternative scheme. So my question is, is there any reason not to use namespaces instead of chroot for that kind of usage?