How to resolve ipv6 ssh on Ubuntu 16.4 with possible interface ambiguity











up vote
0
down vote

favorite












I have a new Ubuntu 16.04 install. I want to ssh into a MacBook Pro via IPV6.



I can ping the Mac from Ubuntu, but it requires me to specify -I.



$ ping6 -c 1 -I enp0s25 fe80::14fc:cec5:c174:d88
PING fe80::14fc:cec5:c174:d88(fe80::14fc:cec5:c174:d88) from fe80::ba94:3d5e:9929:4c6e enp0s25: 56 data bytes
64 bytes from fe80::14fc:cec5:c174:d88: icmp_seq=1 ttl=64 time=0.378 ms


versus



$ ping6 -c 1 fe80::14fc:cec5:c174:d88
connect: Invalid argument


My Ubuntu has only one adapter and interface.



$ ifconfig
enp0s25 Link encap:Ethernet HWaddr b8:ae:ed:77:91:fa
...
lo Link encap:Local Loopback
...


I can ssh into the Mac from a Windows PC that uses PuTTY (plink). All three machines (MacBook, Windows, Ubuntu) are on the same network switch.



# bash on Windows
$ ssh test@fe80::14fc:cec5:c174:d88
Last login: Sat Nov 17 13:16:15 2018 from fe80::e119:5811:40e5:becf%en8
jws-mac:~ test$


On Ubuntu, this is the command I would like to work:



$ ssh -6 test@fe80::14fc:cec5:c174:d88
ssh: connect to host fe80::14fc:cec5:c174:d88 port 22: Invalid argument


It seems like it is a similar result to ping without -I switch. I don't want to use -b switch, because eventually I want to use git with IPV6 ssh url.



Pointers appreciated!










share|improve this question


























    up vote
    0
    down vote

    favorite












    I have a new Ubuntu 16.04 install. I want to ssh into a MacBook Pro via IPV6.



    I can ping the Mac from Ubuntu, but it requires me to specify -I.



    $ ping6 -c 1 -I enp0s25 fe80::14fc:cec5:c174:d88
    PING fe80::14fc:cec5:c174:d88(fe80::14fc:cec5:c174:d88) from fe80::ba94:3d5e:9929:4c6e enp0s25: 56 data bytes
    64 bytes from fe80::14fc:cec5:c174:d88: icmp_seq=1 ttl=64 time=0.378 ms


    versus



    $ ping6 -c 1 fe80::14fc:cec5:c174:d88
    connect: Invalid argument


    My Ubuntu has only one adapter and interface.



    $ ifconfig
    enp0s25 Link encap:Ethernet HWaddr b8:ae:ed:77:91:fa
    ...
    lo Link encap:Local Loopback
    ...


    I can ssh into the Mac from a Windows PC that uses PuTTY (plink). All three machines (MacBook, Windows, Ubuntu) are on the same network switch.



    # bash on Windows
    $ ssh test@fe80::14fc:cec5:c174:d88
    Last login: Sat Nov 17 13:16:15 2018 from fe80::e119:5811:40e5:becf%en8
    jws-mac:~ test$


    On Ubuntu, this is the command I would like to work:



    $ ssh -6 test@fe80::14fc:cec5:c174:d88
    ssh: connect to host fe80::14fc:cec5:c174:d88 port 22: Invalid argument


    It seems like it is a similar result to ping without -I switch. I don't want to use -b switch, because eventually I want to use git with IPV6 ssh url.



    Pointers appreciated!










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have a new Ubuntu 16.04 install. I want to ssh into a MacBook Pro via IPV6.



      I can ping the Mac from Ubuntu, but it requires me to specify -I.



      $ ping6 -c 1 -I enp0s25 fe80::14fc:cec5:c174:d88
      PING fe80::14fc:cec5:c174:d88(fe80::14fc:cec5:c174:d88) from fe80::ba94:3d5e:9929:4c6e enp0s25: 56 data bytes
      64 bytes from fe80::14fc:cec5:c174:d88: icmp_seq=1 ttl=64 time=0.378 ms


      versus



      $ ping6 -c 1 fe80::14fc:cec5:c174:d88
      connect: Invalid argument


      My Ubuntu has only one adapter and interface.



      $ ifconfig
      enp0s25 Link encap:Ethernet HWaddr b8:ae:ed:77:91:fa
      ...
      lo Link encap:Local Loopback
      ...


      I can ssh into the Mac from a Windows PC that uses PuTTY (plink). All three machines (MacBook, Windows, Ubuntu) are on the same network switch.



      # bash on Windows
      $ ssh test@fe80::14fc:cec5:c174:d88
      Last login: Sat Nov 17 13:16:15 2018 from fe80::e119:5811:40e5:becf%en8
      jws-mac:~ test$


      On Ubuntu, this is the command I would like to work:



      $ ssh -6 test@fe80::14fc:cec5:c174:d88
      ssh: connect to host fe80::14fc:cec5:c174:d88 port 22: Invalid argument


      It seems like it is a similar result to ping without -I switch. I don't want to use -b switch, because eventually I want to use git with IPV6 ssh url.



      Pointers appreciated!










      share|improve this question













      I have a new Ubuntu 16.04 install. I want to ssh into a MacBook Pro via IPV6.



      I can ping the Mac from Ubuntu, but it requires me to specify -I.



      $ ping6 -c 1 -I enp0s25 fe80::14fc:cec5:c174:d88
      PING fe80::14fc:cec5:c174:d88(fe80::14fc:cec5:c174:d88) from fe80::ba94:3d5e:9929:4c6e enp0s25: 56 data bytes
      64 bytes from fe80::14fc:cec5:c174:d88: icmp_seq=1 ttl=64 time=0.378 ms


      versus



      $ ping6 -c 1 fe80::14fc:cec5:c174:d88
      connect: Invalid argument


      My Ubuntu has only one adapter and interface.



      $ ifconfig
      enp0s25 Link encap:Ethernet HWaddr b8:ae:ed:77:91:fa
      ...
      lo Link encap:Local Loopback
      ...


      I can ssh into the Mac from a Windows PC that uses PuTTY (plink). All three machines (MacBook, Windows, Ubuntu) are on the same network switch.



      # bash on Windows
      $ ssh test@fe80::14fc:cec5:c174:d88
      Last login: Sat Nov 17 13:16:15 2018 from fe80::e119:5811:40e5:becf%en8
      jws-mac:~ test$


      On Ubuntu, this is the command I would like to work:



      $ ssh -6 test@fe80::14fc:cec5:c174:d88
      ssh: connect to host fe80::14fc:cec5:c174:d88 port 22: Invalid argument


      It seems like it is a similar result to ping without -I switch. I don't want to use -b switch, because eventually I want to use git with IPV6 ssh url.



      Pointers appreciated!







      ssh ipv6 ubuntu-16.04






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 17 at 19:46









      jws

      1956




      1956






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          Since this is a link-local IPv6 address, the local interface identifier must be specified with the remote address.



          $ ifconfig
          enp0s25 Link encap:Ethernet HWaddr b8:ae:ed:77:91:fa
          ...

          $ ssh -6 test@fe80::14fc:cec5:c174:d88%enp0s25


          or



          ssh -6 user@remote-ipv6-address%local-interface-name



          Note enp0s25 depends on the machine and is provided by ifconfig and plugged into ssh.



          Here is an example of an ssh URL, for tools like git, assuming user git and subpath repos/test.git:



          ssh://git@[fe80::14fc:cec5:c174:d88%25enp0s25]/repos/test.git


          or



          ssh://user@[remote-ipv6-address%25*local-interface*]/subpath



          Note the % that separates address from interface has to be URL-encoded as %25.






          share|improve this answer





















            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            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: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














             

            draft saved


            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1376301%2fhow-to-resolve-ipv6-ssh-on-ubuntu-16-4-with-possible-interface-ambiguity%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            Since this is a link-local IPv6 address, the local interface identifier must be specified with the remote address.



            $ ifconfig
            enp0s25 Link encap:Ethernet HWaddr b8:ae:ed:77:91:fa
            ...

            $ ssh -6 test@fe80::14fc:cec5:c174:d88%enp0s25


            or



            ssh -6 user@remote-ipv6-address%local-interface-name



            Note enp0s25 depends on the machine and is provided by ifconfig and plugged into ssh.



            Here is an example of an ssh URL, for tools like git, assuming user git and subpath repos/test.git:



            ssh://git@[fe80::14fc:cec5:c174:d88%25enp0s25]/repos/test.git


            or



            ssh://user@[remote-ipv6-address%25*local-interface*]/subpath



            Note the % that separates address from interface has to be URL-encoded as %25.






            share|improve this answer

























              up vote
              0
              down vote













              Since this is a link-local IPv6 address, the local interface identifier must be specified with the remote address.



              $ ifconfig
              enp0s25 Link encap:Ethernet HWaddr b8:ae:ed:77:91:fa
              ...

              $ ssh -6 test@fe80::14fc:cec5:c174:d88%enp0s25


              or



              ssh -6 user@remote-ipv6-address%local-interface-name



              Note enp0s25 depends on the machine and is provided by ifconfig and plugged into ssh.



              Here is an example of an ssh URL, for tools like git, assuming user git and subpath repos/test.git:



              ssh://git@[fe80::14fc:cec5:c174:d88%25enp0s25]/repos/test.git


              or



              ssh://user@[remote-ipv6-address%25*local-interface*]/subpath



              Note the % that separates address from interface has to be URL-encoded as %25.






              share|improve this answer























                up vote
                0
                down vote










                up vote
                0
                down vote









                Since this is a link-local IPv6 address, the local interface identifier must be specified with the remote address.



                $ ifconfig
                enp0s25 Link encap:Ethernet HWaddr b8:ae:ed:77:91:fa
                ...

                $ ssh -6 test@fe80::14fc:cec5:c174:d88%enp0s25


                or



                ssh -6 user@remote-ipv6-address%local-interface-name



                Note enp0s25 depends on the machine and is provided by ifconfig and plugged into ssh.



                Here is an example of an ssh URL, for tools like git, assuming user git and subpath repos/test.git:



                ssh://git@[fe80::14fc:cec5:c174:d88%25enp0s25]/repos/test.git


                or



                ssh://user@[remote-ipv6-address%25*local-interface*]/subpath



                Note the % that separates address from interface has to be URL-encoded as %25.






                share|improve this answer












                Since this is a link-local IPv6 address, the local interface identifier must be specified with the remote address.



                $ ifconfig
                enp0s25 Link encap:Ethernet HWaddr b8:ae:ed:77:91:fa
                ...

                $ ssh -6 test@fe80::14fc:cec5:c174:d88%enp0s25


                or



                ssh -6 user@remote-ipv6-address%local-interface-name



                Note enp0s25 depends on the machine and is provided by ifconfig and plugged into ssh.



                Here is an example of an ssh URL, for tools like git, assuming user git and subpath repos/test.git:



                ssh://git@[fe80::14fc:cec5:c174:d88%25enp0s25]/repos/test.git


                or



                ssh://user@[remote-ipv6-address%25*local-interface*]/subpath



                Note the % that separates address from interface has to be URL-encoded as %25.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 17 at 21:24









                jws

                1956




                1956






























                     

                    draft saved


                    draft discarded



















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1376301%2fhow-to-resolve-ipv6-ssh-on-ubuntu-16-4-with-possible-interface-ambiguity%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Terni

                    A new problem with tex4ht and tikz

                    Sun Ra