This syntax works for one remote source/destination:rsync -avz -e ssh -p $portNumber user@remoteip:/path/to/files/ /local/path/Which syntax should I use if both source and destination have different SSH ports?
rsync with different ssh ports
ssh;rsync
If both of them have different ports, it is a good time to start thinking about using a configuration files, such as ~/.ssh/config:Host server1  Port port1Host server2  Port port2and you are all set up.