Skip to content

Commit

Permalink
Merge pull request #81 from systemli/sftp-make-chroot-directory-confi…
Browse files Browse the repository at this point in the history
…gurable

Make sftp chroot directory configurable
  • Loading branch information
0x46616c6b authored Mar 28, 2024
2 parents f2b8880 + d7cd581 commit 7c123a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ sshd_use_pam: "yes"
sshd_use_dns: "no"
sshd_sftp_chroot: "no"
sshd_sftp_chroot_group: sftponly
sshd_sftp_chroot_directory: "%h"
sshd_stream_local_bind_unlink: "no"
sshd_allow_agent_forwarding: "no"
# manage authorized keys globally and exclusively
Expand Down
2 changes: 1 addition & 1 deletion templates/sshd_config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Subsystem sftp internal-sftp

{% if sshd_sftp_chroot == 'yes' %}
Match Group {{ sshd_sftp_chroot_group }}
ChrootDirectory %h
ChrootDirectory {{ sshd_sftp_chroot_directory }}
ForceCommand internal-sftp
AllowTcpForwarding no
{% endif %}
Expand Down

0 comments on commit 7c123a5

Please sign in to comment.