Didn’t find this here when I searched. Sharing in case it saves someone else some time.
Updated my discourse Lightsail instance to Ubuntu 22.04 from 18.04.
Everything went great up to the final restart.
Got ssh errors and could not connect.
While this is an AWS Lightsail specific link, the general gist on sshd requirements may help others avoid the 30 minutes I spent searching for the cause and solution.
An easy enough fix once you know the issue.
You have to scroll a bit to find the Ubuntu 20.04 and 22.04 ssh config related bits.