If you will use SSH to login then a chroot can be an option ; let's support we have a user named testusr which will have as home directory /var/chroot/home/testusr :
Note that the above must be executed as root :
# Create the needed dirs
mkdir -p /var/chroot/{lib,lib64,etc,home,usr}
# Create the user account
useradd -d /var/chroot/home/testusr testusr
echo "testusr:testusr" | chpasswd
cd /var/chroot
# Create some basic dev nodes that will be needed by the terminal
mknod -m 666 null c 1 3
mknod -m 666 tty c 5 0
mknod -m 666 zero c 1 5
mknod -m 666 random c 1 8
#Make available the needed libraries
mount -o bind /lib /var/chroot/lib
mount -o bind /lib64 /var/chroot/lib64
mount -o bind /usr /var/chroot/usr
# Set the correct permissions
chown root:root /var/chroot
chmod 755 /var/chroot
# Set the jail on sshd daemon
cat <<EOF >> /etc/ssh/sshd_config
Match user testusr
ChrootDirectory /var/chroot
EOF
# Restart sshd daemon
systemctl restart sshd
# Set the default shell for the user & copy the content of /etc/group and /etc/passwd to the jail
usermod -s /usr/bin/bash testusr
cp /etc/{passwd,group} /var/chroot
Also note that the bind mounts should be permanent ( add them to /etc/fstab ) in case of this is not for a testing purpose.
/bin/sh
or any other shell) in or do anything at all in the system. Probably you have something different in mind.