By default in Linux, an SSH can freely navigate around your file system. I recently needed to restrict an SSH user to their home directory. You need rbash.
CentOS doesn’t ship with rbash enabled as default. It was easy enough to solve.
[codesyntax lang=”bash”]
ln -s /bin/bash /bin/rbash
Then change /etc/passwd so that the user’s shell is /bin/rbash.