Automatically Simple Since 2002
24 August 2011
pw useradd gimpy -d /usr/local/gimpy -s /bin/sh
passwd gimpy # enter password
mkdir /usr/local/gimpy
chown root:gimpy /usr/local/gimpy # root must own the chroot directory
mkdir /usr/local/gimpy/bin
cp /rescue/sh /usr/local/gimpy/bin/
# at the bottom of /etc/ssh/sshd_config:
Match User gimpy
ChrootDirectory /usr/local/gimpy
X11Forwarding no
AllowTcpForwarding no
/etc/rc.d/sshd reload