bind interface for upload : scp works, not rsync

I need to upload file on a specific interface. This cannot be set-up via iptables, because my script output on several interfaces.

this is working fine :

scp -oBindAddress=192.168.100.1 ...

but

rsync --address=192.168.100.1

is still sending on eth0 (192.168.10.1)

how could I force rsync to use 192.168.100.1 ?

any idea ?


rsync can be told what SSH options to use with the "-e" switch.

Try something like:

rsync -e 'ssh -oBindAddress=192.168.100.1'