Can not access SSH after changing port

#1

I changed SSH port ( /etc/ ssh/sshd_config) from 22 to 22122 but i can not access anymore neither on port 22 nor on 22122… i forgot to open the port 22122 on firewalld, which i believe is causing the issue. Can someone help me out and explain step by step how to be able to access SSH again, i am completely lost?

Thank you in advance.

#2

Hello,

You can boot your instance into rescue mode, an Ubuntu Linux booted in the RAM of the Instance, to access your instance and to reconfigure the firewall configuration:

#3

Rescue boot doesn’t make it easy to change firewalld config - another reason why I usually switch to system-config-firewall, where you can easily edit /etc/sysconfig/iptables from a rescue boot.

Have you tried the console? That should let you login as root and use firewall-cmd to open your new SSH port. It did not work for me on Firefox, but Epiphany browser works fine.