I have created AWS lightsail instance for learning purposes. I downloaded the key file and created a public key with it and store it in the .ssh/authorized_keys file.
For the testing, I tried to connect with ssh via my terminal. It was connected and worked fine and I closed the connection and reboot the server.
After reboot the server I tried to connect again with a key file from my terminal and I was not able to log in. I logged in to the AWS console and try to connect from that end and, it was giving me an empty black screen window.
Any suggestions?
As of my experience this black screen due to main two reasons
open ssh_config file
sudo nano /etc/ssh/sshd_config
Add below codes:
CASignatureAlgorithms +ssh-rsa
PubkeyAcceptedAlgorithms +ssh-rsa
PermitRootLogin yes
PasswordAuthentication no
PubkeyAuthentication yes
AllowUsers ubuntu
then save file and sudo systemctl restart sshd for restart
sudo ufw disableIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With