No route to host on port (SSH)
Clash 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
centos ssh
 |Â
show 1 more comment
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
centos ssh
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 gottenConnection refused
. Now you're gettingNo 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 ofifconfig
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
 |Â
show 1 more comment
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
centos ssh
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
centos ssh
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 gottenConnection refused
. Now you're gettingNo 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 ofifconfig
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
 |Â
show 1 more comment
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 gottenConnection refused
. Now you're gettingNo 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 ofifconfig
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
 |Â
show 1 more comment
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.
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
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.
answered Aug 8 at 15:36
ThisGuyHasTwoThumbs
1979
1979
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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 gettingNo 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