Yes, you can use "rsync" over SSH via shell scripts if that's what you mean. You can also call "rsync" from other languages, though I would check to see if the language of your choice already has an API for such activities.
When you are using keys for authentication you'll need to tell the SSH client which key when called by "rsync".
Code:
rsync -av -e "ssh -i /home/zvivered/.ssh/key_foo_rsa" \
/source/ server.example.org:/destination/
If things are automated, then once you work out the basics, you'll want to make that key single-purpose by modifying the public key (in
authorized_keys on the remote machine) to start with a
command="..." option. Substitute the ... for the actual "rsync" command including options as it would run on the remote machine. You can see that with -v on the SSH client:
Code:
rsync -av -e "ssh -v -i /home/zvivered/.ssh/key_foo_rsa" \
/source/ server.example.org:/destination/
Once you have the options set, you can remove the -v.