Changing listening ports with openSSH












0















i recently decided to turn my old desktop pc into a linux server where i can host my files etc. I followed a tutorial which used openssh and after installing it and configuring some files it works like a charm. I have a few questions though: the tutorial i followed here uses nc -v -z [addr] [port] to check if the ssh service is working on that port. However, no matter which port i use in the sshd_config file, it won't successfully listen on that port. Any ideas why?



PS: i'm a complete beginner to linux :)



*Running on Ubuntu 18.04LTS










share|improve this question























  • Are you running the nc command with the loopback address 127.0.0.1 as shown in the guide you linked? from where are you running the command?

    – steeldriver
    40 mins ago











  • @steeldriver no,I'm using the local one and I'm running it from /home

    – Stelios Papamichail
    29 mins ago
















0















i recently decided to turn my old desktop pc into a linux server where i can host my files etc. I followed a tutorial which used openssh and after installing it and configuring some files it works like a charm. I have a few questions though: the tutorial i followed here uses nc -v -z [addr] [port] to check if the ssh service is working on that port. However, no matter which port i use in the sshd_config file, it won't successfully listen on that port. Any ideas why?



PS: i'm a complete beginner to linux :)



*Running on Ubuntu 18.04LTS










share|improve this question























  • Are you running the nc command with the loopback address 127.0.0.1 as shown in the guide you linked? from where are you running the command?

    – steeldriver
    40 mins ago











  • @steeldriver no,I'm using the local one and I'm running it from /home

    – Stelios Papamichail
    29 mins ago














0












0








0








i recently decided to turn my old desktop pc into a linux server where i can host my files etc. I followed a tutorial which used openssh and after installing it and configuring some files it works like a charm. I have a few questions though: the tutorial i followed here uses nc -v -z [addr] [port] to check if the ssh service is working on that port. However, no matter which port i use in the sshd_config file, it won't successfully listen on that port. Any ideas why?



PS: i'm a complete beginner to linux :)



*Running on Ubuntu 18.04LTS










share|improve this question














i recently decided to turn my old desktop pc into a linux server where i can host my files etc. I followed a tutorial which used openssh and after installing it and configuring some files it works like a charm. I have a few questions though: the tutorial i followed here uses nc -v -z [addr] [port] to check if the ssh service is working on that port. However, no matter which port i use in the sshd_config file, it won't successfully listen on that port. Any ideas why?



PS: i'm a complete beginner to linux :)



*Running on Ubuntu 18.04LTS







networking server ssh






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 52 mins ago









Stelios PapamichailStelios Papamichail

12




12













  • Are you running the nc command with the loopback address 127.0.0.1 as shown in the guide you linked? from where are you running the command?

    – steeldriver
    40 mins ago











  • @steeldriver no,I'm using the local one and I'm running it from /home

    – Stelios Papamichail
    29 mins ago



















  • Are you running the nc command with the loopback address 127.0.0.1 as shown in the guide you linked? from where are you running the command?

    – steeldriver
    40 mins ago











  • @steeldriver no,I'm using the local one and I'm running it from /home

    – Stelios Papamichail
    29 mins ago

















Are you running the nc command with the loopback address 127.0.0.1 as shown in the guide you linked? from where are you running the command?

– steeldriver
40 mins ago





Are you running the nc command with the loopback address 127.0.0.1 as shown in the guide you linked? from where are you running the command?

– steeldriver
40 mins ago













@steeldriver no,I'm using the local one and I'm running it from /home

– Stelios Papamichail
29 mins ago





@steeldriver no,I'm using the local one and I'm running it from /home

– Stelios Papamichail
29 mins ago










1 Answer
1






active

oldest

votes


















0














sshd, the ssh server, reads its config file (/etc/ssh/sshd_config) on sshd startup.



sudo service sshd restart


is one way to make this happen. Doing this will drop all current ssh sessions.






share|improve this answer























    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',
    autoActivateHeartbeat: false,
    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%2f1119981%2fchanging-listening-ports-with-openssh%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









    0














    sshd, the ssh server, reads its config file (/etc/ssh/sshd_config) on sshd startup.



    sudo service sshd restart


    is one way to make this happen. Doing this will drop all current ssh sessions.






    share|improve this answer




























      0














      sshd, the ssh server, reads its config file (/etc/ssh/sshd_config) on sshd startup.



      sudo service sshd restart


      is one way to make this happen. Doing this will drop all current ssh sessions.






      share|improve this answer


























        0












        0








        0







        sshd, the ssh server, reads its config file (/etc/ssh/sshd_config) on sshd startup.



        sudo service sshd restart


        is one way to make this happen. Doing this will drop all current ssh sessions.






        share|improve this answer













        sshd, the ssh server, reads its config file (/etc/ssh/sshd_config) on sshd startup.



        sudo service sshd restart


        is one way to make this happen. Doing this will drop all current ssh sessions.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 22 mins ago









        waltinatorwaltinator

        22.4k74169




        22.4k74169






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • 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%2faskubuntu.com%2fquestions%2f1119981%2fchanging-listening-ports-with-openssh%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

            香粉寮

            GameSpot