Add sftp jail.

This commit is contained in:
Tom Alexander
2024-06-30 23:02:23 -04:00
parent 0363a462a0
commit 566b7dfd0b
27 changed files with 220 additions and 7 deletions

View File

@@ -0,0 +1,17 @@
# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile .ssh/authorized_keys
# Only allow sftp users
AllowUsers nochainstounlock
ChrootDirectory /chroot
# override default of no subsystems
Subsystem sftp /usr/libexec/sftp-server
# Example of overriding settings on a per-user basis
Match User nochainstounlock
X11Forwarding no
AllowTcpForwarding no
PermitTTY no
ForceCommand internal-sftp

View File

@@ -0,0 +1 @@
sshd_enable="YES"