samba

SSH Chroot

May 4th, 2011
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. # There's obviously a lot more configuration in sshd_config.
  2. # These are just the important pieces for this project.
  3.  
  4.  
  5. # $HOME/.ssh must be owned by root, group must match the related users
  6. # $HOME/.ssh/authorized_keys.$USER must be mode 0444
  7. # If you still get login failures, check /var/log/auth.log
  8. # NOTE: ln -s /root/.ssh/authorized_keys /root/.ssh/authorized_keys.root
  9. # ... or you won't be able to log in after you restart SSH ;)
  10. AuthorizedKeysFile %h/.ssh/authorized_keys.%u
  11.  
  12. # We use keys exclusively.
  13. PasswordAuthentication no
  14.  
  15.  
  16. # Restrict access to chroot for sftp users
  17. Subsystem sftp internal-sftp
  18. Match Group sftp
  19. ChrootDirectory %h
  20. ForceCommand internal-sftp
  21. AllowTcpForwarding no
  22.  
  23.  
  24. # rsync_shell: http://pastebin.com/HGSfn18H
  25. Match Group rsync
  26. AllowTcpForwarding no
  27. ForceCommand /usr/local/bin/rsync_shell
Advertisement
Add Comment
Please, Sign In to add comment