Last active
June 7, 2022 08:50
-
-
Save tushev/549825627d0694228dd9d509860999c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a part of /etc/ssh/sshd_config | |
Match User XXXXXXXXXXX | |
AllowTcpForwarding yes | |
X11Forwarding no | |
AllowAgentForwarding no | |
# ForceCommand /bin/false | |
# GatewayPorts no | |
PubkeyAuthentication yes | |
PasswordAuthentication no | |
PermitEmptyPasswords no | |
# !!! /home/%u/chroot MUST be owned by root: | |
# chown root:root /home/XXXXXXXXXXX | |
# chmod 701 /home/XXXXXXXXXXX | |
# mkdir /home/XXXXXXXXXXX/chroot | |
# chown root:root /home/XXXXXXXXXXX/chroot | |
# chmod 705 /home/XXXXXXXXXXX/chroot | |
# !!! SOLVE NAME RESOLUTION ISSUE ( https://askubuntu.com/a/469213 // https://serverfault.com/a/958928 ): | |
# mkdir /home/XXXXXXXXXXX/chroot/etc | |
# echo 'nameserver 8.8.4.4' > /home/XXXXXXXXXXX/chroot/etc/resolv.conf | |
ChrootDirectory %h/chroot | |
ForceCommand internal-sftp | |
HostbasedAuthentication no | |
RhostsRSAAuthentication no | |
Banner none |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment