It took a while to get this to work, see here for a full example and explanations.
In short you need to:
create an ssh config file that hold information about the ssh session
remote=your_ip_address echo "HostName $remote" > ssh_config echo "User root" >> ssh_config echo "ControlMaster auto" >> ssh_config echo "ControlPath ~/.ssh/%C" >> ssh_config master_ssh='ssh -F ssh_config'
remote=your_ip_address echo "HostName $remote" > ssh_config echo "User root" >> ssh_config echo "ControlMaster auto" >> ssh_config echo "ControlPath ~/.ssh/%C" >> ssh_config master_ssh='ssh -F ssh_config'start the master session
$master_ssh -MNf $remote
$master_ssh -MNf $remotedo the rsyncs
rsync -e "$master_ssh" $opts $remote:/etc/some_file1 local_directory/ rsync -e "$master_ssh" $opts $remote:/etc/some_file2 local_directory/ rsync -e "$master_ssh" $opts $remote:/etc/some_file3 local_directory/
rsync -e "$master_ssh" $opts $remote:/etc/some_file1 local_directory/ rsync -e "$master_ssh" $opts $remote:/etc/some_file2 local_directory/ rsync -e "$master_ssh" $opts $remote:/etc/some_file3 local_directory/close the master session
$master_ssh -O exit $remote
$master_ssh -O exit $remote