Skip to content

SSH keeps becoming unresponsive and unusable

0

Hi all. Request for assistance please. Attempting to fix a DNS resolution on AWS Lightsail. Our Lightsail instance cannot resolve api.hgraph.io, which we need. We are told we need to update our "/etc/resolv.conf". However - we cannot keep our SSH working long enough to make the changes - it keeps freezing and any code pasted in ends up in the clipboard and we cannot go any further. The SSH becomes unresponsive.

Question - Is there a work around we could use to make the DNS changes without using SSH, to change /etc/resolv.conf contents to two nameservers (8.8.8.8 and 1.1.1.1)?

Many thanks. Eric

asked a year ago207 views

2 Answers
0

I understand you're facing issues with SSH becoming unresponsive while trying to update the DNS configuration on your AWS Lightsail instance. This is a frustrating situation, but there are a few potential workarounds you can try:

  1. Use the Lightsail console's browser-based SSH: Instead of using your local SSH client, try accessing your instance through the Lightsail console's built-in browser-based SSH. This might be more stable and allow you to make the necessary changes.

  2. Create a startup script: You can create a startup script in the Lightsail console that will run when your instance boots. This script could update the /etc/resolv.conf file with the desired nameservers. To do this:

    • Stop your instance
    • Create a startup script in the Lightsail console with the following content: #!/bin/bash echo "nameserver 8.8.8.8" > /etc/resolv.conf echo "nameserver 1.1.1.1" >> /etc/resolv.conf
    • Start your instance again
  3. Use a snapshot: If possible, create a snapshot of your instance, then launch a new instance from this snapshot. During the launch process, you can specify a launch script that updates the DNS configuration.

  4. Upgrade instance size: If the SSH issues are due to resource constraints, consider upgrading to a larger Lightsail plan. This might resolve performance issues causing SSH to become unresponsive.

  5. Contact AWS Support: If none of these options work, you may need to reach out to AWS Lightsail support for further assistance. They might be able to help you access the instance or make the necessary changes.

Remember, after making these changes, you may need to restart your networking service or reboot the instance for the changes to take effect. Also, be cautious when modifying system files like /etc/resolv.conf, as incorrect changes can cause connectivity issues.
Sources
Lightsail SSH - Connection (Request) Port 22: Connection timed out Issue . | AWS re:Post
SSH for 2 of Amazon Lightsail Ubuntu instances not working! | AWS re:Post
Lightsail SSH connect timing out | AWS re:Post
Losing ssh connection into my Lightsail and EC2 AWS after a while | AWS re:Post

answered a year ago

0

Thank you for your suggestions. However, these could not be attempted without some human guidance and review and it appears AWS / AWS Lightsail are not interested in responding to our charity's request for technical support. We have been trying for two weeks. Disappointing to see we are valued less than other AWS customers.

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.