跳至内容

Lightsail SSH connect failed

0

I am using a Lightsail instance. SSH connection is not working. I have tried rebooting and restarting, but the connection still does not work. I would appreciate your help.

已提问 3 个月前68 查看次数
1 回答
1

I understand you're experiencing SSH connection issues with your Lightsail instance. This is a common problem that can have several causes. Here are some troubleshooting steps you can try:

  1. Verify your instance status in the Lightsail console to ensure it's running properly.

  2. Check that port 22 (for SSH) is open in your instance's firewall/security group settings. Sometimes these settings can change unexpectedly.

  3. The issue might be caused by a firewall on the Lightsail OS side. When you can access the instance, you could try running these commands 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
  1. Monitor your instance's resource usage. High CPU or memory utilization can impact SSH responsiveness. Check the metrics in the Lightsail console.

  2. If the problem persists, consider upgrading to a larger Lightsail plan as resource constraints could be causing the issue.

  3. As a last resort, create 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 none of these steps resolve the issue, I recommend contacting AWS Support for further assistance as there might be underlying issues with the instance or host system that aren't visible to you.
Sources
Lightsail SSH connect timing out | AWS re:Post
Lightsail SSH - Connection (Request) Port 22: Connection timed out Issue . | AWS re:Post
Blank screen on web based SSH console and terminal SSH | AWS re:Post
Can not connect to lightsail server even on web ssh, port is open | AWS re:Post

已回答 3 个月前
AWS
专家
已审核 3 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。