Debian Stretch / Gnome Network Manager: select network interface for sftp

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
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 credentialse@81.169.bla.bla: <<<"ls -la"
But it still doesn't select the interface, or something is not working:
Couldn't read packet: Connection reset by peer
debian network-interface networkmanager modem
add a comment |Â
up vote
0
down vote
favorite
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 credentialse@81.169.bla.bla: <<<"ls -la"
But it still doesn't select the interface, or something is not working:
Couldn't read packet: Connection reset by peer
debian network-interface networkmanager modem
1
Have you tried adding a route for that address to use that interface? cyberciti.biz/faq/linux-route-add
â Nick ODell
Sep 2 at 21:27
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
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 credentialse@81.169.bla.bla: <<<"ls -la"
But it still doesn't select the interface, or something is not working:
Couldn't read packet: Connection reset by peer
debian network-interface networkmanager modem
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 credentialse@81.169.bla.bla: <<<"ls -la"
But it still doesn't select the interface, or something is not working:
Couldn't read packet: Connection reset by peer
debian network-interface networkmanager modem
debian network-interface networkmanager modem
edited Sep 2 at 19:34
asked Sep 2 at 19:21
0__
318314
318314
1
Have you tried adding a route for that address to use that interface? cyberciti.biz/faq/linux-route-add
â Nick ODell
Sep 2 at 21:27
add a comment |Â
1
Have you tried adding a route for that address to use that interface? cyberciti.biz/faq/linux-route-add
â Nick ODell
Sep 2 at 21:27
1
1
Have you tried adding a route for that address to use that interface? cyberciti.biz/faq/linux-route-add
â Nick ODell
Sep 2 at 21:27
Have you tried adding a route for that address to use that interface? cyberciti.biz/faq/linux-route-add
â Nick ODell
Sep 2 at 21:27
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
Configure the eth0 interface via /etc/network/interfaces, e.g.:
auto eth0
iface eth0 inet static
address 192.168.0.123
netmask 255.255.255.0
Any interfaces defined via that file will be ignored by NetworkManager, so NetworkManager will still attempt to establish a connection via the other interface.
As the eth0 interface, configured as above, does noet have a gateway (default route) set, that will be configured on the other interface and sftp and any other connection to other networks than 192.168.0.0/24 should work fine.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Configure the eth0 interface via /etc/network/interfaces, e.g.:
auto eth0
iface eth0 inet static
address 192.168.0.123
netmask 255.255.255.0
Any interfaces defined via that file will be ignored by NetworkManager, so NetworkManager will still attempt to establish a connection via the other interface.
As the eth0 interface, configured as above, does noet have a gateway (default route) set, that will be configured on the other interface and sftp and any other connection to other networks than 192.168.0.0/24 should work fine.
add a comment |Â
up vote
0
down vote
Configure the eth0 interface via /etc/network/interfaces, e.g.:
auto eth0
iface eth0 inet static
address 192.168.0.123
netmask 255.255.255.0
Any interfaces defined via that file will be ignored by NetworkManager, so NetworkManager will still attempt to establish a connection via the other interface.
As the eth0 interface, configured as above, does noet have a gateway (default route) set, that will be configured on the other interface and sftp and any other connection to other networks than 192.168.0.0/24 should work fine.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Configure the eth0 interface via /etc/network/interfaces, e.g.:
auto eth0
iface eth0 inet static
address 192.168.0.123
netmask 255.255.255.0
Any interfaces defined via that file will be ignored by NetworkManager, so NetworkManager will still attempt to establish a connection via the other interface.
As the eth0 interface, configured as above, does noet have a gateway (default route) set, that will be configured on the other interface and sftp and any other connection to other networks than 192.168.0.0/24 should work fine.
Configure the eth0 interface via /etc/network/interfaces, e.g.:
auto eth0
iface eth0 inet static
address 192.168.0.123
netmask 255.255.255.0
Any interfaces defined via that file will be ignored by NetworkManager, so NetworkManager will still attempt to establish a connection via the other interface.
As the eth0 interface, configured as above, does noet have a gateway (default route) set, that will be configured on the other interface and sftp and any other connection to other networks than 192.168.0.0/24 should work fine.
answered Sep 4 at 12:58
wurtel
9,42011324
9,42011324
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f466438%2fdebian-stretch-gnome-network-manager-select-network-interface-for-sftp%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
Have you tried adding a route for that address to use that interface? cyberciti.biz/faq/linux-route-add
â Nick ODell
Sep 2 at 21:27