Skip to content

Instantly share code, notes, and snippets.

@dryliketoast
Created July 7, 2017 09:45
Show Gist options
  • Select an option

  • Save dryliketoast/f6bfd039f68f30f159764566e047b7ce to your computer and use it in GitHub Desktop.

Select an option

Save dryliketoast/f6bfd039f68f30f159764566e047b7ce to your computer and use it in GitHub Desktop.
Create test user:
useradd test
passwd test
usermod -G www-data test
usermod -d /usr/share/nginx/html test
chown test:www-data /usr/share/nginx/html
Additions to sshd_config:
AllowUsers test
Match User test
ChrootDirectory /usr/share/nginx/html
PasswordAuthentication yes
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment