AWS LightSail SSH says UPSTREAM_NOT_FOUND And Also not able to connect by PUTTY
Asked Answered
R

5

6

ssh -i "LightsailDefaultKey-ap-south-1.pem" bitnami@[ip-of-lightsail-instance] ssh: connect to host 6[ip-of-lightsail-instance] port 22: Connection timed out

UPSTREAM_NOT_FOUND An error occurred and we were unable to connect or stay connected to your instance. If this instance has just started up, try again in a minute or two. UPSTREAM_NOT_FOUND [519]

PUTTY says Connection Timeout

Rectify answered 7/10, 2020 at 11:33 Comment(1)
Bitnami Engineer here, please contact the Lightsail support team. They should provide you with more information about the instance's status and what's wrong with the SSH configuration.Accumulation
B
3

Create a snapshot and add script

sudo ufw disable
sudo iptables -F
sudo mv /etc/hosts.deny /etc/hosts.deny_backup
sudo touch /etc/hosts.deny
echo "Port 22" >> /etc/ssh/sshd_config
systemctl restart sshd
sudo systemctl enable sshd
sudo systemctl restart sshd

Wait 10-15minutes. Done! Issue fixed :-)

Backgammon answered 17/5, 2022 at 17:23 Comment(0)
A
1

I struggled with this 519 Upstream Error for several days in Lightsail as well. I could not connect via SSH-in-Browser, nor via SSH in my Mac Terminal. It simply timed out.

However, I found a solution that works -

In short, you can:

  1. Create a snapshot of the "broken server"
  2. Export to Amazon EC2 (think of EC2 as a more manipulatable version of Lightsail)
  3. Create a new volume from that snapshot in EC2, and mount it on a new machine image

There is a great video here that I followed step by step: https://www.youtube.com/watch?v=EN2oXVuOTSo

After following those steps, I was able to SSH in to the new volume, and recover all my data in the /mnt directory. You may need to change some permissions with chown to access the data.

Apollonian answered 24/6, 2021 at 9:36 Comment(0)
U
0

Ran into the same problem. Managed to log in after rebooting from the browser. My problem started after some upgrades and updates and heavy installations that took up most of my 512MB memory. The solution going forward is to create a swapfile to improve the performance of the system.

Uphill answered 17/3, 2021 at 8:46 Comment(0)
R
0

Were you able to make your instance working, or it was just data retrieval? For only data and files, EC2 is not required. You can use AWS cli to create disksnapshot, then create disk, and attach to any instance, mount and then access files.

Ritualize answered 19/10, 2021 at 2:56 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Intention
J
0

My SSH connection was done after changing SSH port, just a reboot and use the new port I could connect again.

If this still didn't work, you could resort to the official Adding a Lightsail instance to Systems Manager while launching section, I followed to create a new instance from the snapshot, the new instance is reachable by SSH.

Johnnie answered 13/12, 2022 at 5:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.