Ubuntu ssh: connect to host localhost port 22: Connection refused











up vote
0
down vote

favorite












I am trying to install Hadoop3.0 on my laptop which is Windows 10. I installed ubuntu 16.0.4 on the same laptop. Hadoop installation is complete but I am not able to start the daemon as it is throwing me port 22: connection refused error. I tried to uninstall and reinstall SSH. Also, changed the settings in sshd_config file as well. Unfortunately, nothing seems to be working. I have been stuck on this for about a week. Would appreciate if you could help me on this.










share|improve this question


















  • 2




    There's far too little information here - did you install Ubuntu on the laptop as a separate (dual boot) system? in a VM? via Microsoft WSL? How did you configure the network? where are you trying to connect from, and how?
    – steeldriver
    Jul 1 at 19:36










  • I installed it as a windows subsystem. I have followed the steps included in the link: windowscentral.com/…. I installed Hadoop on my laptop through ubuntu. I am getting the error when I try $ ssh localhost from the prompt. I am new to Linux environment. Your suggestions will help me a lot.
    – Sandeep Krishna
    Jul 2 at 19:00















up vote
0
down vote

favorite












I am trying to install Hadoop3.0 on my laptop which is Windows 10. I installed ubuntu 16.0.4 on the same laptop. Hadoop installation is complete but I am not able to start the daemon as it is throwing me port 22: connection refused error. I tried to uninstall and reinstall SSH. Also, changed the settings in sshd_config file as well. Unfortunately, nothing seems to be working. I have been stuck on this for about a week. Would appreciate if you could help me on this.










share|improve this question


















  • 2




    There's far too little information here - did you install Ubuntu on the laptop as a separate (dual boot) system? in a VM? via Microsoft WSL? How did you configure the network? where are you trying to connect from, and how?
    – steeldriver
    Jul 1 at 19:36










  • I installed it as a windows subsystem. I have followed the steps included in the link: windowscentral.com/…. I installed Hadoop on my laptop through ubuntu. I am getting the error when I try $ ssh localhost from the prompt. I am new to Linux environment. Your suggestions will help me a lot.
    – Sandeep Krishna
    Jul 2 at 19:00













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am trying to install Hadoop3.0 on my laptop which is Windows 10. I installed ubuntu 16.0.4 on the same laptop. Hadoop installation is complete but I am not able to start the daemon as it is throwing me port 22: connection refused error. I tried to uninstall and reinstall SSH. Also, changed the settings in sshd_config file as well. Unfortunately, nothing seems to be working. I have been stuck on this for about a week. Would appreciate if you could help me on this.










share|improve this question













I am trying to install Hadoop3.0 on my laptop which is Windows 10. I installed ubuntu 16.0.4 on the same laptop. Hadoop installation is complete but I am not able to start the daemon as it is throwing me port 22: connection refused error. I tried to uninstall and reinstall SSH. Also, changed the settings in sshd_config file as well. Unfortunately, nothing seems to be working. I have been stuck on this for about a week. Would appreciate if you could help me on this.







ssh






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jul 1 at 18:56









Sandeep Krishna

11




11








  • 2




    There's far too little information here - did you install Ubuntu on the laptop as a separate (dual boot) system? in a VM? via Microsoft WSL? How did you configure the network? where are you trying to connect from, and how?
    – steeldriver
    Jul 1 at 19:36










  • I installed it as a windows subsystem. I have followed the steps included in the link: windowscentral.com/…. I installed Hadoop on my laptop through ubuntu. I am getting the error when I try $ ssh localhost from the prompt. I am new to Linux environment. Your suggestions will help me a lot.
    – Sandeep Krishna
    Jul 2 at 19:00














  • 2




    There's far too little information here - did you install Ubuntu on the laptop as a separate (dual boot) system? in a VM? via Microsoft WSL? How did you configure the network? where are you trying to connect from, and how?
    – steeldriver
    Jul 1 at 19:36










  • I installed it as a windows subsystem. I have followed the steps included in the link: windowscentral.com/…. I installed Hadoop on my laptop through ubuntu. I am getting the error when I try $ ssh localhost from the prompt. I am new to Linux environment. Your suggestions will help me a lot.
    – Sandeep Krishna
    Jul 2 at 19:00








2




2




There's far too little information here - did you install Ubuntu on the laptop as a separate (dual boot) system? in a VM? via Microsoft WSL? How did you configure the network? where are you trying to connect from, and how?
– steeldriver
Jul 1 at 19:36




There's far too little information here - did you install Ubuntu on the laptop as a separate (dual boot) system? in a VM? via Microsoft WSL? How did you configure the network? where are you trying to connect from, and how?
– steeldriver
Jul 1 at 19:36












I installed it as a windows subsystem. I have followed the steps included in the link: windowscentral.com/…. I installed Hadoop on my laptop through ubuntu. I am getting the error when I try $ ssh localhost from the prompt. I am new to Linux environment. Your suggestions will help me a lot.
– Sandeep Krishna
Jul 2 at 19:00




I installed it as a windows subsystem. I have followed the steps included in the link: windowscentral.com/…. I installed Hadoop on my laptop through ubuntu. I am getting the error when I try $ ssh localhost from the prompt. I am new to Linux environment. Your suggestions will help me a lot.
– Sandeep Krishna
Jul 2 at 19:00










1 Answer
1






active

oldest

votes

















up vote
1
down vote













Try



sudo service ssh restart
ssh localhost


select option yes. You may get public key error



Then try



ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 0600 ~/.ssh/authorized_keys


Once done.



Try ssh localhost






share|improve this answer










New contributor




Roshan Shah 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: "89"
    };
    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%2faskubuntu.com%2fquestions%2f1051293%2fubuntu-ssh-connect-to-host-localhost-port-22-connection-refused%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
    1
    down vote













    Try



    sudo service ssh restart
    ssh localhost


    select option yes. You may get public key error



    Then try



    ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
    cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
    chmod 0600 ~/.ssh/authorized_keys


    Once done.



    Try ssh localhost






    share|improve this answer










    New contributor




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






















      up vote
      1
      down vote













      Try



      sudo service ssh restart
      ssh localhost


      select option yes. You may get public key error



      Then try



      ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
      cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
      chmod 0600 ~/.ssh/authorized_keys


      Once done.



      Try ssh localhost






      share|improve this answer










      New contributor




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




















        up vote
        1
        down vote










        up vote
        1
        down vote









        Try



        sudo service ssh restart
        ssh localhost


        select option yes. You may get public key error



        Then try



        ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
        cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
        chmod 0600 ~/.ssh/authorized_keys


        Once done.



        Try ssh localhost






        share|improve this answer










        New contributor




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









        Try



        sudo service ssh restart
        ssh localhost


        select option yes. You may get public key error



        Then try



        ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
        cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
        chmod 0600 ~/.ssh/authorized_keys


        Once done.



        Try ssh localhost







        share|improve this answer










        New contributor




        Roshan Shah 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








        edited Nov 20 at 21:38









        abu-ahmed al-khatiri

        85314




        85314






        New contributor




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









        answered Nov 20 at 13:56









        Roshan Shah

        111




        111




        New contributor




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





        New contributor





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






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






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1051293%2fubuntu-ssh-connect-to-host-localhost-port-22-connection-refused%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

            Category:香港粉麵

            List *all* the tuples!

            Channel [V]