backup data with rsync and ssh

I have computer1 as a data source and computer2 as a backup machine, computer1 and computer2 is also an example username on both machine. I want to create a backup function using rsycn and ssh without using password so it can run in cronjob automatically…