“No route to host” fix for Centos 7

After changing SSH port, If I try to SSH using new port number

I was getting error “no route to host”

The issue was due to IPtables

I have to flush all firewall rules using

IPtables -f

serveice iptables restart

This fixed the ssh port issue