There are basically two ways of archiving this
Changing rsync’s rsh parameter
You can simply feed ssh
with a different port parameter as remote shell to ssh:
$ rsync -a --inplace --rsh='ssh -p12345' file user@remotehost:dir/
Create a per host config for ssh
Add a Host
entry to ~/.ssh/config
[...] Host foobar Port 12345 User user Hostname host.example
and invoke rsync
with that alias
$ rsync -a --inplace file foobar:dir/
Very good article on rsync. Here is one from around 1999 but still the very best rsync tutorial I’ve ever read. Explains it very well IMO: http://tinyurl.com/l37guv8