There are two main reasons why you might get “Log in failed. If this instance has just started up, try again in a minute or two. CLIENT_UNAUTHORIZED ” in Amazon Lightsail browser based SSH login.
You will need SSH login from Putty, etc.
If you cannot remote in using SSH then you cannot fix this. This is only for using the Lightsail browser based SSH.
If you can’t use remote SSH, look at your instance firewall settings and make sure you’re IP is allowed.
Your machine’s clock is wrong
Check time with https://time.is/UTC (AWS is in UTC time)
sudo date -u
If there’s a mismatch for Ubuntu 18.x try:
sudo timedatectl set-ntp off
sudo timedatectl set-ntp on
sudo dpkg-reconfigure tzdata
You are missing the AWS CA cert from /etc/ssh/sshd_config
sudo nano /etc/ssh/sshd_config
Scroll to the bottom and add this, then restart SSH:
You may also need to this in addition to the above:
sudo service ssh restart
Now login through the LightSail browser based SSH.