rsync -rave "ssh -i /User/hellome/myssh_key/thesshkey.pem" /Users/antmac/raislapps/iamfree/public/assets --rsync-path="sudo rsync" ssh -i ssh -i thesshkey.pem firstname.lastname@example.org:/var/www/
firstly the command
then the path to the ssh key
Path to the file or directory you are transfering (path to the origination)
then rsync path
then the server user@server ip
then the destination path.
This can be used to build the Ruby on Rails asset pipeline assets locally and sync with the server.
See the above code does the sudo rsync.