Same syntax, SSH transport
rsync uses SSH by default for remote transfers — same key, same agent, same ~/.ssh/config. The remote side just needs rsync installed, which it almost always is. You can pass SSH options through with -e.
The trailing slash — the #1 source of rsync confusion
This single rule causes more rsync sadness than any other:
rsync -av project/ dest/— copies the contents ofproject/intodest/.rsync -av project dest/— copies the directory itself intodest/, ending up atdest/project/.
The trailing slash on project/ means "the contents of" — like the shell glob project/* but including dotfiles. No trailing slash means "this directory as a whole."
When in doubt, --dry-run first.