SSH-keys ipv4 ipv6 connection issue












0















Update: I found this question which seems to be very related. Not sure how exactly.



What am I missing? I can only use ssh when it resolves through https hostnames? Normal ssh it hangs kinda like encryption keys aren't working, but I am using keys that I know have worked in the past.



ssh -v server

OpenSSH_7.9p1, OpenSSL 1.1.1b 26 Feb 2019
debug1: Reading configuration data /home/user/.ssh/config
debug1: /home/user/.ssh/config line 39: Applying options for server
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to x.x.x.x [x.x.x.x] port 22.


my config



Host server
User user
HostName x.x.x.x
IdentityFile ~/.ssh/id_key


I don't recall ever changing my /etc/ssh/ssh_config and my firewall is set to allow ssh.










share|improve this question









New contributor




volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • 10.0.0.231:2222 is not a valid destination. Use either ssh -p 2222 j@10.0.0.231 or ssh ssh://j@10.0.0.231:2222. What do you mean by "I can ssh when it resolves through https hostnames"?

    – tastytea
    11 hours ago













  • oh yeah i thought I took that out, thats just aspecific port for that box.....I have servers with ssl certificates specific ssh-keys and I can ssh to their hostnames

    – volare
    11 hours ago











  • Would you update your question with the output of ssh -v server, please?

    – tastytea
    11 hours ago






  • 1





    I meant ssh -v <IP/hostname of your server>, not the string "server".

    – tastytea
    11 hours ago











  • I updated the question with info from the bad connection, it hangs after it reads the configuration file. do you want output from the working connection? how much should I post?

    – volare
    10 hours ago
















0















Update: I found this question which seems to be very related. Not sure how exactly.



What am I missing? I can only use ssh when it resolves through https hostnames? Normal ssh it hangs kinda like encryption keys aren't working, but I am using keys that I know have worked in the past.



ssh -v server

OpenSSH_7.9p1, OpenSSL 1.1.1b 26 Feb 2019
debug1: Reading configuration data /home/user/.ssh/config
debug1: /home/user/.ssh/config line 39: Applying options for server
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to x.x.x.x [x.x.x.x] port 22.


my config



Host server
User user
HostName x.x.x.x
IdentityFile ~/.ssh/id_key


I don't recall ever changing my /etc/ssh/ssh_config and my firewall is set to allow ssh.










share|improve this question









New contributor




volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • 10.0.0.231:2222 is not a valid destination. Use either ssh -p 2222 j@10.0.0.231 or ssh ssh://j@10.0.0.231:2222. What do you mean by "I can ssh when it resolves through https hostnames"?

    – tastytea
    11 hours ago













  • oh yeah i thought I took that out, thats just aspecific port for that box.....I have servers with ssl certificates specific ssh-keys and I can ssh to their hostnames

    – volare
    11 hours ago











  • Would you update your question with the output of ssh -v server, please?

    – tastytea
    11 hours ago






  • 1





    I meant ssh -v <IP/hostname of your server>, not the string "server".

    – tastytea
    11 hours ago











  • I updated the question with info from the bad connection, it hangs after it reads the configuration file. do you want output from the working connection? how much should I post?

    – volare
    10 hours ago














0












0








0








Update: I found this question which seems to be very related. Not sure how exactly.



What am I missing? I can only use ssh when it resolves through https hostnames? Normal ssh it hangs kinda like encryption keys aren't working, but I am using keys that I know have worked in the past.



ssh -v server

OpenSSH_7.9p1, OpenSSL 1.1.1b 26 Feb 2019
debug1: Reading configuration data /home/user/.ssh/config
debug1: /home/user/.ssh/config line 39: Applying options for server
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to x.x.x.x [x.x.x.x] port 22.


my config



Host server
User user
HostName x.x.x.x
IdentityFile ~/.ssh/id_key


I don't recall ever changing my /etc/ssh/ssh_config and my firewall is set to allow ssh.










share|improve this question









New contributor




volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












Update: I found this question which seems to be very related. Not sure how exactly.



What am I missing? I can only use ssh when it resolves through https hostnames? Normal ssh it hangs kinda like encryption keys aren't working, but I am using keys that I know have worked in the past.



ssh -v server

OpenSSH_7.9p1, OpenSSL 1.1.1b 26 Feb 2019
debug1: Reading configuration data /home/user/.ssh/config
debug1: /home/user/.ssh/config line 39: Applying options for server
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to x.x.x.x [x.x.x.x] port 22.


my config



Host server
User user
HostName x.x.x.x
IdentityFile ~/.ssh/id_key


I don't recall ever changing my /etc/ssh/ssh_config and my firewall is set to allow ssh.







ssh dns host-name-resolution






share|improve this question









New contributor




volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 24 mins ago







volare













New contributor




volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 11 hours ago









volarevolare

61




61




New contributor




volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • 10.0.0.231:2222 is not a valid destination. Use either ssh -p 2222 j@10.0.0.231 or ssh ssh://j@10.0.0.231:2222. What do you mean by "I can ssh when it resolves through https hostnames"?

    – tastytea
    11 hours ago













  • oh yeah i thought I took that out, thats just aspecific port for that box.....I have servers with ssl certificates specific ssh-keys and I can ssh to their hostnames

    – volare
    11 hours ago











  • Would you update your question with the output of ssh -v server, please?

    – tastytea
    11 hours ago






  • 1





    I meant ssh -v <IP/hostname of your server>, not the string "server".

    – tastytea
    11 hours ago











  • I updated the question with info from the bad connection, it hangs after it reads the configuration file. do you want output from the working connection? how much should I post?

    – volare
    10 hours ago



















  • 10.0.0.231:2222 is not a valid destination. Use either ssh -p 2222 j@10.0.0.231 or ssh ssh://j@10.0.0.231:2222. What do you mean by "I can ssh when it resolves through https hostnames"?

    – tastytea
    11 hours ago













  • oh yeah i thought I took that out, thats just aspecific port for that box.....I have servers with ssl certificates specific ssh-keys and I can ssh to their hostnames

    – volare
    11 hours ago











  • Would you update your question with the output of ssh -v server, please?

    – tastytea
    11 hours ago






  • 1





    I meant ssh -v <IP/hostname of your server>, not the string "server".

    – tastytea
    11 hours ago











  • I updated the question with info from the bad connection, it hangs after it reads the configuration file. do you want output from the working connection? how much should I post?

    – volare
    10 hours ago

















10.0.0.231:2222 is not a valid destination. Use either ssh -p 2222 j@10.0.0.231 or ssh ssh://j@10.0.0.231:2222. What do you mean by "I can ssh when it resolves through https hostnames"?

– tastytea
11 hours ago







10.0.0.231:2222 is not a valid destination. Use either ssh -p 2222 j@10.0.0.231 or ssh ssh://j@10.0.0.231:2222. What do you mean by "I can ssh when it resolves through https hostnames"?

– tastytea
11 hours ago















oh yeah i thought I took that out, thats just aspecific port for that box.....I have servers with ssl certificates specific ssh-keys and I can ssh to their hostnames

– volare
11 hours ago





oh yeah i thought I took that out, thats just aspecific port for that box.....I have servers with ssl certificates specific ssh-keys and I can ssh to their hostnames

– volare
11 hours ago













Would you update your question with the output of ssh -v server, please?

– tastytea
11 hours ago





Would you update your question with the output of ssh -v server, please?

– tastytea
11 hours ago




1




1





I meant ssh -v <IP/hostname of your server>, not the string "server".

– tastytea
11 hours ago





I meant ssh -v <IP/hostname of your server>, not the string "server".

– tastytea
11 hours ago













I updated the question with info from the bad connection, it hangs after it reads the configuration file. do you want output from the working connection? how much should I post?

– volare
10 hours ago





I updated the question with info from the bad connection, it hangs after it reads the configuration file. do you want output from the working connection? how much should I post?

– volare
10 hours ago










2 Answers
2






active

oldest

votes


















0














If you want to connect to a particular port on the remote system with ssh, you should be using the -p option:



ssh -p 2222 j@10.0.0.231


When the target address does not look like an IP number, which it does not do if you add :2222 to the end of it, ssh will try to resolve the whole string 10.0.0.231:2222 as a hostname using DNS.



If you find yourself connecting to this host on this port often, you may want to set up a configuration for it to make it easier. Edit (or create) your ~/.ssh/config file and add



Host thehost
User j
HostName 10.0.0.231
Port 2222


and then use



ssh thehost





share|improve this answer
























  • Sorry that part is irrelevant. I thought I erased it. I've been able to access that in the past without issue and it isn't really the problem im tryin to solve.

    – volare
    11 hours ago











  • @JacobBruck The ssh client may say "connection timed out" when you use it with an IP address, but it would not say "could not resolve hostname" since you're not giving it a hostname. Could you please re-run your test and insert the proper error message in the question?

    – Kusalananda
    11 hours ago











  • Yep I'm looking back at what is going on here. That solution does work, which tells me my test was flawed from the start..so I'm back to square one..

    – volare
    11 hours ago



















0














This isn't the full answer, but my encryption keys work with ipv6.



so two possibble answers. I'm dumb and got ssh keys mixed up a billion times a long with my ip addresses, (very likely), but I still can't connect when I try an ipv4 address with encryption keys



So I did something to make ssh only allow encryption keys with ipv6? I don't know if that is even a thing, or how or why. And why would ipv4 work without encryption?






share|improve this answer








New contributor




volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















    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',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    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
    });


    }
    });






    volare is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f508321%2fssh-keys-ipv4-ipv6-connection-issue%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    If you want to connect to a particular port on the remote system with ssh, you should be using the -p option:



    ssh -p 2222 j@10.0.0.231


    When the target address does not look like an IP number, which it does not do if you add :2222 to the end of it, ssh will try to resolve the whole string 10.0.0.231:2222 as a hostname using DNS.



    If you find yourself connecting to this host on this port often, you may want to set up a configuration for it to make it easier. Edit (or create) your ~/.ssh/config file and add



    Host thehost
    User j
    HostName 10.0.0.231
    Port 2222


    and then use



    ssh thehost





    share|improve this answer
























    • Sorry that part is irrelevant. I thought I erased it. I've been able to access that in the past without issue and it isn't really the problem im tryin to solve.

      – volare
      11 hours ago











    • @JacobBruck The ssh client may say "connection timed out" when you use it with an IP address, but it would not say "could not resolve hostname" since you're not giving it a hostname. Could you please re-run your test and insert the proper error message in the question?

      – Kusalananda
      11 hours ago











    • Yep I'm looking back at what is going on here. That solution does work, which tells me my test was flawed from the start..so I'm back to square one..

      – volare
      11 hours ago
















    0














    If you want to connect to a particular port on the remote system with ssh, you should be using the -p option:



    ssh -p 2222 j@10.0.0.231


    When the target address does not look like an IP number, which it does not do if you add :2222 to the end of it, ssh will try to resolve the whole string 10.0.0.231:2222 as a hostname using DNS.



    If you find yourself connecting to this host on this port often, you may want to set up a configuration for it to make it easier. Edit (or create) your ~/.ssh/config file and add



    Host thehost
    User j
    HostName 10.0.0.231
    Port 2222


    and then use



    ssh thehost





    share|improve this answer
























    • Sorry that part is irrelevant. I thought I erased it. I've been able to access that in the past without issue and it isn't really the problem im tryin to solve.

      – volare
      11 hours ago











    • @JacobBruck The ssh client may say "connection timed out" when you use it with an IP address, but it would not say "could not resolve hostname" since you're not giving it a hostname. Could you please re-run your test and insert the proper error message in the question?

      – Kusalananda
      11 hours ago











    • Yep I'm looking back at what is going on here. That solution does work, which tells me my test was flawed from the start..so I'm back to square one..

      – volare
      11 hours ago














    0












    0








    0







    If you want to connect to a particular port on the remote system with ssh, you should be using the -p option:



    ssh -p 2222 j@10.0.0.231


    When the target address does not look like an IP number, which it does not do if you add :2222 to the end of it, ssh will try to resolve the whole string 10.0.0.231:2222 as a hostname using DNS.



    If you find yourself connecting to this host on this port often, you may want to set up a configuration for it to make it easier. Edit (or create) your ~/.ssh/config file and add



    Host thehost
    User j
    HostName 10.0.0.231
    Port 2222


    and then use



    ssh thehost





    share|improve this answer













    If you want to connect to a particular port on the remote system with ssh, you should be using the -p option:



    ssh -p 2222 j@10.0.0.231


    When the target address does not look like an IP number, which it does not do if you add :2222 to the end of it, ssh will try to resolve the whole string 10.0.0.231:2222 as a hostname using DNS.



    If you find yourself connecting to this host on this port often, you may want to set up a configuration for it to make it easier. Edit (or create) your ~/.ssh/config file and add



    Host thehost
    User j
    HostName 10.0.0.231
    Port 2222


    and then use



    ssh thehost






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered 11 hours ago









    KusalanandaKusalananda

    137k17258426




    137k17258426













    • Sorry that part is irrelevant. I thought I erased it. I've been able to access that in the past without issue and it isn't really the problem im tryin to solve.

      – volare
      11 hours ago











    • @JacobBruck The ssh client may say "connection timed out" when you use it with an IP address, but it would not say "could not resolve hostname" since you're not giving it a hostname. Could you please re-run your test and insert the proper error message in the question?

      – Kusalananda
      11 hours ago











    • Yep I'm looking back at what is going on here. That solution does work, which tells me my test was flawed from the start..so I'm back to square one..

      – volare
      11 hours ago



















    • Sorry that part is irrelevant. I thought I erased it. I've been able to access that in the past without issue and it isn't really the problem im tryin to solve.

      – volare
      11 hours ago











    • @JacobBruck The ssh client may say "connection timed out" when you use it with an IP address, but it would not say "could not resolve hostname" since you're not giving it a hostname. Could you please re-run your test and insert the proper error message in the question?

      – Kusalananda
      11 hours ago











    • Yep I'm looking back at what is going on here. That solution does work, which tells me my test was flawed from the start..so I'm back to square one..

      – volare
      11 hours ago

















    Sorry that part is irrelevant. I thought I erased it. I've been able to access that in the past without issue and it isn't really the problem im tryin to solve.

    – volare
    11 hours ago





    Sorry that part is irrelevant. I thought I erased it. I've been able to access that in the past without issue and it isn't really the problem im tryin to solve.

    – volare
    11 hours ago













    @JacobBruck The ssh client may say "connection timed out" when you use it with an IP address, but it would not say "could not resolve hostname" since you're not giving it a hostname. Could you please re-run your test and insert the proper error message in the question?

    – Kusalananda
    11 hours ago





    @JacobBruck The ssh client may say "connection timed out" when you use it with an IP address, but it would not say "could not resolve hostname" since you're not giving it a hostname. Could you please re-run your test and insert the proper error message in the question?

    – Kusalananda
    11 hours ago













    Yep I'm looking back at what is going on here. That solution does work, which tells me my test was flawed from the start..so I'm back to square one..

    – volare
    11 hours ago





    Yep I'm looking back at what is going on here. That solution does work, which tells me my test was flawed from the start..so I'm back to square one..

    – volare
    11 hours ago













    0














    This isn't the full answer, but my encryption keys work with ipv6.



    so two possibble answers. I'm dumb and got ssh keys mixed up a billion times a long with my ip addresses, (very likely), but I still can't connect when I try an ipv4 address with encryption keys



    So I did something to make ssh only allow encryption keys with ipv6? I don't know if that is even a thing, or how or why. And why would ipv4 work without encryption?






    share|improve this answer








    New contributor




    volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.

























      0














      This isn't the full answer, but my encryption keys work with ipv6.



      so two possibble answers. I'm dumb and got ssh keys mixed up a billion times a long with my ip addresses, (very likely), but I still can't connect when I try an ipv4 address with encryption keys



      So I did something to make ssh only allow encryption keys with ipv6? I don't know if that is even a thing, or how or why. And why would ipv4 work without encryption?






      share|improve this answer








      New contributor




      volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.























        0












        0








        0







        This isn't the full answer, but my encryption keys work with ipv6.



        so two possibble answers. I'm dumb and got ssh keys mixed up a billion times a long with my ip addresses, (very likely), but I still can't connect when I try an ipv4 address with encryption keys



        So I did something to make ssh only allow encryption keys with ipv6? I don't know if that is even a thing, or how or why. And why would ipv4 work without encryption?






        share|improve this answer








        New contributor




        volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.










        This isn't the full answer, but my encryption keys work with ipv6.



        so two possibble answers. I'm dumb and got ssh keys mixed up a billion times a long with my ip addresses, (very likely), but I still can't connect when I try an ipv4 address with encryption keys



        So I did something to make ssh only allow encryption keys with ipv6? I don't know if that is even a thing, or how or why. And why would ipv4 work without encryption?







        share|improve this answer








        New contributor




        volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        share|improve this answer



        share|improve this answer






        New contributor




        volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered 9 hours ago









        volarevolare

        61




        61




        New contributor




        volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






















            volare is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            volare is a new contributor. Be nice, and check out our Code of Conduct.













            volare is a new contributor. Be nice, and check out our Code of Conduct.












            volare is a new contributor. Be nice, and check out our Code of Conduct.
















            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f508321%2fssh-keys-ipv4-ipv6-connection-issue%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

            CARDNET

            Boot-repair Failure: Unable to locate package grub-common:i386

            濃尾地震