Typical rsync (1) configuration file on the server is located in /usr/local/etc/rsynchd.conf and should have a section of the form:
[section] path = /directory auth users = username secrets file = /usr/local/etc/rsyncd.secrets uid = 0 gid = 0 hosts allow = 192.41.170.22 host deny = 0.0.0.0/0
The rsyncd.secrets file contains the username:password used by the client to connect to the server. It must be chmod 600.
On the client the user username must launch the synchronization with the rsync (1) command:
rsync -aczHAX --delete --password-file=passwd_file server::section /directory