Ssh – No route to host on port (SSH)

centosssh

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

Best 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.

Related Question