User Tools

Site Tools


server-management:sftponly-ssh

Enable the option on /etc/ssh/sshd_config

Match Group sftponly
ChrootDirectory %h
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp

Add group for sftponly

addgroup --system sftponly

Add username to sftpoly group

usermod -G sftponly website

Change ownership and permissions of folder where $HOME is gonna be

chown root:root /home/website/
chmod 0755 /home/website/

Change ownership of writable folder by user

chown website:sftponly www
server-management/sftponly-ssh.txt · Last modified: 2018/10/08 11:06 by osiux