No route to host on port (SSH)

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
-1
down vote

favorite












I updated my SSH port from 22 to 6433 and now I can't SSH into my machine. I updated this line in /etc/ssh/sshd_config:



# If you want to change the port on a SELinux system, you have to tell
# SELinux about this change.
# semanage port -a -t ssh_port_t -p tcp #PORTNUMBER
#
Port 22


to



# If you want to change the port on a SELinux system, you have to tell
# SELinux about this change.
# semanage port -a -t ssh_port_t -p tcp #PORTNUMBER
#
Port 6433


I restarted my ssh service using



$ service sshd restart


no errors were returned. Open up a new Terminal tab and run:



$ ssh user@ip.address -p6433


which returns:




ssh: connect to host ip.address port 6433: No route to host




Not sure how to go about fixing?



update -



SELinux is not enabled










share|improve this question























  • You may have selinux turn on and as the comment right above Port line on the text you copied says you may need to update selinux with semanage.
    – Mehmet
    Aug 8 at 15:27






  • 1




    If the SSH server wasn't listening on that port, you would have gotten Connection refused. Now you're getting No route to host which means that the client can't even see the host on the network.
    – Kusalananda
    Aug 8 at 15:27










  • @Mehmet selinux doth be disabled I'm afraid :/
    – ThisGuyHasTwoThumbs
    Aug 8 at 15:28










  • @Kusalananda which is weird, because my connect session is fine in the sense of ifconfig shows expected values
    – ThisGuyHasTwoThumbs
    Aug 8 at 15:29






  • 5




    Check if iptables/firewall-cmd is configured to allow your new port. If that is not the cause, check if you are accessing the ip address through another network device. In that case the new port must be opened there as well.
    – Vinod
    Aug 8 at 15:31















up vote
-1
down vote

favorite












I updated my SSH port from 22 to 6433 and now I can't SSH into my machine. I updated this line in /etc/ssh/sshd_config:



# If you want to change the port on a SELinux system, you have to tell
# SELinux about this change.
# semanage port -a -t ssh_port_t -p tcp #PORTNUMBER
#
Port 22


to



# If you want to change the port on a SELinux system, you have to tell
# SELinux about this change.
# semanage port -a -t ssh_port_t -p tcp #PORTNUMBER
#
Port 6433


I restarted my ssh service using



$ service sshd restart


no errors were returned. Open up a new Terminal tab and run:



$ ssh user@ip.address -p6433


which returns:




ssh: connect to host ip.address port 6433: No route to host




Not sure how to go about fixing?



update -



SELinux is not enabled










share|improve this question























  • You may have selinux turn on and as the comment right above Port line on the text you copied says you may need to update selinux with semanage.
    – Mehmet
    Aug 8 at 15:27






  • 1




    If the SSH server wasn't listening on that port, you would have gotten Connection refused. Now you're getting No route to host which means that the client can't even see the host on the network.
    – Kusalananda
    Aug 8 at 15:27










  • @Mehmet selinux doth be disabled I'm afraid :/
    – ThisGuyHasTwoThumbs
    Aug 8 at 15:28










  • @Kusalananda which is weird, because my connect session is fine in the sense of ifconfig shows expected values
    – ThisGuyHasTwoThumbs
    Aug 8 at 15:29






  • 5




    Check if iptables/firewall-cmd is configured to allow your new port. If that is not the cause, check if you are accessing the ip address through another network device. In that case the new port must be opened there as well.
    – Vinod
    Aug 8 at 15:31













up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











I updated my SSH port from 22 to 6433 and now I can't SSH into my machine. I updated this line in /etc/ssh/sshd_config:



# If you want to change the port on a SELinux system, you have to tell
# SELinux about this change.
# semanage port -a -t ssh_port_t -p tcp #PORTNUMBER
#
Port 22


to



# If you want to change the port on a SELinux system, you have to tell
# SELinux about this change.
# semanage port -a -t ssh_port_t -p tcp #PORTNUMBER
#
Port 6433


I restarted my ssh service using



$ service sshd restart


no errors were returned. Open up a new Terminal tab and run:



$ ssh user@ip.address -p6433


which returns:




ssh: connect to host ip.address port 6433: No route to host




Not sure how to go about fixing?



update -



SELinux is not enabled










share|improve this question















I updated my SSH port from 22 to 6433 and now I can't SSH into my machine. I updated this line in /etc/ssh/sshd_config:



# If you want to change the port on a SELinux system, you have to tell
# SELinux about this change.
# semanage port -a -t ssh_port_t -p tcp #PORTNUMBER
#
Port 22


to



# If you want to change the port on a SELinux system, you have to tell
# SELinux about this change.
# semanage port -a -t ssh_port_t -p tcp #PORTNUMBER
#
Port 6433


I restarted my ssh service using



$ service sshd restart


no errors were returned. Open up a new Terminal tab and run:



$ ssh user@ip.address -p6433


which returns:




ssh: connect to host ip.address port 6433: No route to host




Not sure how to go about fixing?



update -



SELinux is not enabled







centos ssh






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 8 at 15:28

























asked Aug 8 at 15:22









ThisGuyHasTwoThumbs

1979




1979











  • You may have selinux turn on and as the comment right above Port line on the text you copied says you may need to update selinux with semanage.
    – Mehmet
    Aug 8 at 15:27






  • 1




    If the SSH server wasn't listening on that port, you would have gotten Connection refused. Now you're getting No route to host which means that the client can't even see the host on the network.
    – Kusalananda
    Aug 8 at 15:27










  • @Mehmet selinux doth be disabled I'm afraid :/
    – ThisGuyHasTwoThumbs
    Aug 8 at 15:28










  • @Kusalananda which is weird, because my connect session is fine in the sense of ifconfig shows expected values
    – ThisGuyHasTwoThumbs
    Aug 8 at 15:29






  • 5




    Check if iptables/firewall-cmd is configured to allow your new port. If that is not the cause, check if you are accessing the ip address through another network device. In that case the new port must be opened there as well.
    – Vinod
    Aug 8 at 15:31

















  • You may have selinux turn on and as the comment right above Port line on the text you copied says you may need to update selinux with semanage.
    – Mehmet
    Aug 8 at 15:27






  • 1




    If the SSH server wasn't listening on that port, you would have gotten Connection refused. Now you're getting No route to host which means that the client can't even see the host on the network.
    – Kusalananda
    Aug 8 at 15:27










  • @Mehmet selinux doth be disabled I'm afraid :/
    – ThisGuyHasTwoThumbs
    Aug 8 at 15:28










  • @Kusalananda which is weird, because my connect session is fine in the sense of ifconfig shows expected values
    – ThisGuyHasTwoThumbs
    Aug 8 at 15:29






  • 5




    Check if iptables/firewall-cmd is configured to allow your new port. If that is not the cause, check if you are accessing the ip address through another network device. In that case the new port must be opened there as well.
    – Vinod
    Aug 8 at 15:31
















You may have selinux turn on and as the comment right above Port line on the text you copied says you may need to update selinux with semanage.
– Mehmet
Aug 8 at 15:27




You may have selinux turn on and as the comment right above Port line on the text you copied says you may need to update selinux with semanage.
– Mehmet
Aug 8 at 15:27




1




1




If the SSH server wasn't listening on that port, you would have gotten Connection refused. Now you're getting No route to host which means that the client can't even see the host on the network.
– Kusalananda
Aug 8 at 15:27




If the SSH server wasn't listening on that port, you would have gotten Connection refused. Now you're getting No route to host which means that the client can't even see the host on the network.
– Kusalananda
Aug 8 at 15:27












@Mehmet selinux doth be disabled I'm afraid :/
– ThisGuyHasTwoThumbs
Aug 8 at 15:28




@Mehmet selinux doth be disabled I'm afraid :/
– ThisGuyHasTwoThumbs
Aug 8 at 15:28












@Kusalananda which is weird, because my connect session is fine in the sense of ifconfig shows expected values
– ThisGuyHasTwoThumbs
Aug 8 at 15:29




@Kusalananda which is weird, because my connect session is fine in the sense of ifconfig shows expected values
– ThisGuyHasTwoThumbs
Aug 8 at 15:29




5




5




Check if iptables/firewall-cmd is configured to allow your new port. If that is not the cause, check if you are accessing the ip address through another network device. In that case the new port must be opened there as well.
– Vinod
Aug 8 at 15:31





Check if iptables/firewall-cmd is configured to allow your new port. If that is not the cause, check if you are accessing the ip address through another network device. In that case the new port must be opened there as well.
– Vinod
Aug 8 at 15:31











1 Answer
1






active

oldest

votes

















up vote
2
down vote



accepted










Thanks to @Vinod I got on the right track, achieved by doing:



$ firewall-cmd --zone=permanent --add-port=6433/tcp
$ firewall-cmd --reload


now I can SSH into my server.






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%2f461308%2fno-route-to-host-on-port-ssh%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
    2
    down vote



    accepted










    Thanks to @Vinod I got on the right track, achieved by doing:



    $ firewall-cmd --zone=permanent --add-port=6433/tcp
    $ firewall-cmd --reload


    now I can SSH into my server.






    share|improve this answer
























      up vote
      2
      down vote



      accepted










      Thanks to @Vinod I got on the right track, achieved by doing:



      $ firewall-cmd --zone=permanent --add-port=6433/tcp
      $ firewall-cmd --reload


      now I can SSH into my server.






      share|improve this answer






















        up vote
        2
        down vote



        accepted







        up vote
        2
        down vote



        accepted






        Thanks to @Vinod I got on the right track, achieved by doing:



        $ firewall-cmd --zone=permanent --add-port=6433/tcp
        $ firewall-cmd --reload


        now I can SSH into my server.






        share|improve this answer












        Thanks to @Vinod I got on the right track, achieved by doing:



        $ firewall-cmd --zone=permanent --add-port=6433/tcp
        $ firewall-cmd --reload


        now I can SSH into my server.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Aug 8 at 15:36









        ThisGuyHasTwoThumbs

        1979




        1979



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f461308%2fno-route-to-host-on-port-ssh%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Displaying single band from multi-band raster using QGIS

            How many registers does an x86_64 CPU actually have?