System Engineering

Chroot for SFTP on OpenSUSE

1. Add chroot to SSHD Configuration file
vi /etc/ssh/sshd_config

Match Group uploaders,!admin
  X11Forwarding no
  AllowTcpForwarding no
  ForceCommand internal-sftp
  ChrootDirectory /home/uploaders

Match User cacti Address *,!10.10.1.0/24
  ForceCommand /bin/false
2. Mount directory to home directory
vi /etc/fstab

/home/www/www.mysite.com /home/uploaders/www.mysite.com none bind 0 0

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.