I just setup a VM.Standard.E2.1.Micro instance with Ubuntu 20.04. I've been trying to change the default SSH port from 22 to 4545, and added it to the iptables using:
$ sudo iptables -A INPUT -p tcp --dport 4545 -j ACCEPT anywhere
and saved and reloaded iptables.
I then made changes to the sshd_config file by uncommenting #port 22 to PORT 4545, and restarting the ssh server.
After all of that I can no longer connect using port 4545 and PUTTY.
This is the second instance gone to waste today. Any help on what's the right way to do this, and how I can login now that I cannot?
P. S. I added a TCP rule 4545 in the web interface too.
Thanks,