chroot_sftp:start
Ceci est une ancienne révision du document !
Table des matières
Chroot sftp
Principe
Créer un utilisateur pour accès en sftp avec uniquement la possibilité de télécharger des fichiers d'un seul serveur.
Configuration
Créer l'utilisateur et configurer les bons droits :
useradd userplop -d /home/plop/download mkdir /home/plop/download chmod 750 /home/plop/download chown root:userplop /home/plop/download
Éditer la conf' sshd :
vim /etc/ssh/sshd_config
Commenter la ligne existante et pour la remplacer par la suivante :
#Subsystem sftp /usr/lib/openssh/sftp-server Subsystem sftp internal-sftp -f AUTH -l VERBOSE
Et ajouter ces lignes à la fin (important!) du fichier :
Match User userplop
ChrootDirectory /home/plop/download
ForceCommand internal-sftp
AllowTcpForwarding no
GatewayPorts no
X11Forwarding no
Redémarrer le service pour prendre en compte ces modif' :
systemctl restart sshd
chroot_sftp/start.1497101703.txt.gz · Dernière modification : (modification externe)
