TL;DR: Can't SSH to my EC2 instance after upgrading Ubuntu.
I set up a EC2 instance with Bitnami Wordpress AMI. The image has Ubuntu 16.04 and I want Ubuntu 18.04 so I connected to the instance via SSH using PuTTY with
ubuntu@ec2-{ip}.compute-1.amazonaws.com
and once inside I did
sudo do-release-upgrade
During upgrade I was prompted to choose between updating or preserving ssh_config. I chose to preserve it because I wanted to use the SSH key I had set for the instance.
I was prompted to reboot the instance which I did. After reboot the server works (I can connect to it from my browser) but I can't connect via SSH. PuTTY error message is
Network error: Connection refused.
I did notice the ip changed after reboot and I did use the new ip when trying to connect.
Additionally: I don't know how to check the contents of ssh_config or if the SSH service is running without connecting via SSH.