So I have a computer running Debian Stretch; it needs to network to a Raspberry Pi on eth0
using a static IP (e.g. 192.168.0.x), while being able to grab files via sftp using a mobile broadband modem (wwx....
; and that's a dynamic IP, e.g. 10.73.28.x).
The problem is, as soon as the two computers are connected and eth0 is up, sftp works no longer, as it seems to try to connect using eth0. How can I force it to use a different network interface, such as wlan or modem?
For example, this works for ping if I have the server's IP and don't need DNS:
ping -I wwx58... 81.169.bla.bla
So I tried this:
sftp -o BindAddress=10.73.bla.bla -q [email protected]: <<<"ls -la"
But it still doesn't select the interface, or something is not working:
Couldn't read packet: Connection reset by peer