Radek Asked: 2010-11-22 21:58:23 +0800 CST2010-11-22 21:58:23 +0800 CST 2010-11-22 21:58:23 +0800 CST can I jail ssh for more that one directory? 772 I have working jail ssh to one directory. I would love to give r/w access for the jail ssh user to few directories. For example /tmp/user /home/user /srv/www/user is that possible? ssh jail 2 Answers Voted Best Answer Jake Wilson 2010-11-22T22:40:44+08:002010-11-22T22:40:44+08:00 You cannot symlink to anything that is not inside the chroot'ed environment. I would suggest doing a mount --bind: (assuming the user's chroot directory is /home/john mount --bind /tmp/john /home/john/tmp/john mount --bind /srv/www/john /home/john/srv/www/john 3molo 2010-11-22T22:30:01+08:002010-11-22T22:30:01+08:00 You can create the directories under /home/user, and then symlink them to the original places. The only problem I see is that the users /tmp will not have the /tmp's noexec.
You cannot symlink to anything that is not inside the chroot'ed environment.
I would suggest doing a
mount --bind
:(assuming the user's chroot directory is
/home/john
You can create the directories under /home/user, and then symlink them to the original places. The only problem I see is that the users /tmp will not have the /tmp's noexec.