Whilst creating a testuser, I was 99% sure that the user path would have been its home directory, and in theory nothing else could have been seen when connecting regardless.
I was wrong, so in the attempt to limit the SSH of a user to a certain folder and only that up I read some guidelines and SE answers (e.g. this one) to found most of them pointing to something like
Match User testuser
ChrootDirectory /home/testuser
ForceCommand internal-sftp
But when I attempted to SSH, an error message saying "broken pipe" is arise and I couldn't figure out to resolve.
Any idea where I can continue to read and/or setup?
Thanks
chroot
blocks the user from everything outside their home directory. It prevents them using any installed programs, even the command line (bash). – Philip Couling Feb 25 '19 at 16:40