Table des matières

chroot pour un utilisateur sftp

Instructions

  1. Editer le fichier sshd_conf
    nano /etc/ssh/sshd_config

    Et rajouter après UsePam=yes

    Match User **UTILISATEUR**
       ChrootDirectory /path
       AllowTCPForwarding no
       X11Forwarding no
       ForceCommand internal-sftp
  2. Changer les droits sur le dossier
    chmod 755 /path -R
    chown root:root /path -R
  3. Redémarrer le service
    service ssh restart

Sources

https://unix.stackexchange.com/questions/359523/restrict-sftp-user-to-multiple-folders