- Newest
- Most votes
- Most comments
The issue you're experiencing with the black screen on the web-based SSH console and the connection timeout in the terminal is a common problem with Lightsail instances. There are several potential causes and solutions you can try:
-
Instance Resource Usage: High CPU or memory usage can impact SSH responsiveness. Check your instance's resource metrics in the Lightsail console to see if there are any spikes or consistent high usage.
-
Firewall Settings: Verify that port 22 (for SSH) is open in your instance's firewall settings. Sometimes, these settings can change unexpectedly.
-
OS-level Firewall: The issue might be caused by a firewall on the Lightsail OS side. If you can access the instance, you could try running a script to disable the firewall and reset iptables:
sudo ufw disable sudo iptables -F sudo mv /etc/hosts.deny /etc/hosts.deny_backup sudo touch /etc/hosts.deny sudo systemctl enable sshd sudo systemctl restart sshd
-
Reboot the Instance: If you haven't already, try rebooting the instance from the Lightsail console. This is the least disruptive solution and maintains the same public IP.
-
Stop and Start the Instance: If a reboot doesn't work, try stopping and starting the instance. Note that this will change your public IP address unless you're using a static IP.
-
Instance Size: If you're consistently experiencing high resource usage, you might need to upgrade to a larger Lightsail plan.
-
Data Recovery: If you continue to have issues, consider creating a snapshot of your instance's root volume. This will allow you to recover your data and potentially attach it to a new, functioning instance.
If these steps don't resolve the issue, it may be worth contacting AWS Lightsail support for further assistance, as there could be underlying issues with the instance or the host system that aren't visible to you as a user.
Sources
Lightsail SSH connect timing out | AWS re:Post
Lightsail SSH - Connection (Request) Port 22: Connection timed out Issue . | AWS re:Post
Relevant content
asked 2 years ago
asked a year ago
asked 2 years ago
