I am trying to change default port of SSH from 22 to 2292, Host: RHEL 7.1
I have tried:
ssh -p 2292 firstname.lastname@example.org
ssh: connect to host lrmi079.pll.domin.com port 2292: No route to host
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
It's possible that this new port 2292 is not open on your RHEL 7.1 host and the inbuilt firewall (also known as iptables) is declining the connectivity.
Check the current firewall rules:
$ sudo iptables -L
To open up a new port - port 2292 - in your case:
$ sudo firewall-cmd --zone=public --add-port=2292/tcp --permanent $ sudo firewall-cmd --reload
Check the updated rules:
$ firewall-cmd --list-all
Let me know if it worked.