Chroot Users With sftp
Created: 10/27/2006
General Information
This walkthrough will root your users to their home directory for those users you don't want browsing all over your FreeBSD machine. I would suggest doing this at your console or possibly running a script to kill all the running sshds and then starting the sshd2 deamon.Requirements
Installation
Install ssh2 from the ports collection:|
# # |
cd /usr/ports/security/ssh2 make install clean |
Configuration
In/usr/local/etc/ssh2/sshd2_config set the ChRootGroups and ChRootUsers directives to chroot the group(s) and/or user(s) that are to have ChRooted access./etc/rc.conf:|
sshd_enable="NO" |
/etc/rc.conf:|
sshd2_enable="YES" |
|
# # |
killall sshd ps -auxw | grep sshd |
| # | /usr/local/etc/rc.d/sshd.sh start |
/bin/nologin or something similar.Author: Bill
wolson at gmail dot com