Specifying a different ssh port while doing rsync

Use rsync with the -e option to specify the port:

rsync -avr -e 'ssh -p 9992' files/ [email protected]:/var/www/

Here, you specify the port with rsync -e 'ssh -p PORT'