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

The name of the pictureThe name of the pictureThe name of the pictureClash 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









share|improve this question



















  • 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














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









share|improve this question



















  • 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












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









share|improve this question















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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












  • 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










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.






share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    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






























    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.






    share|improve this answer
























      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.






      share|improve this answer






















        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.






        share|improve this answer












        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.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Sep 4 at 12:58









        wurtel

        9,42011324




        9,42011324



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            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













































































            Popular posts from this blog

            Peggy Mitchell

            Palaiologos

            The Forum (Inglewood, California)