2 Setup rsync-semichroot ForceCommand in a user's ssh options to allow the user
3 to run only rsync server side component on a dedicated machine, e.g. for backuping
6 User's authorized_keys file (usually ~/.ssh/authorized_keys) may look like:
9 command="/usr/local/bin/rsync-semichroot /var/backups/users/joe",no-agent-forwarding,no-port-forwarding,no-pty,no-user-rc,no-X11-forwarding ssh-rsa AAAAB3N...longPublicKey...2z4D joe@joe-pc
12 First and only parameter of rsync-semichroot is a directory all rsync request
13 jailed in. This is not a real chroot(2), the script just prepends the given
14 directory name in front of the destination directory parameter of rsync.
16 Do not use user's home directory or any parent directory as semichroot,
17 so the user can overwrite authorized_keys file permitting himself other
18 operations on target machine.