Create an SSH Tunnel on AWS Lightsail (Bitnami)

Some services on AWS Lightsail (like phpMyAdmin) are only accessible from localhost for security reasons. To access them safely, you can create an SSH tunnel.

Step 1: Open a terminal

On Windows, use PowerShell.
On macOS/Linux, use Terminal.

Step 2: Run the SSH tunnel command

ssh -i "C:\Users\User\Downloads\name_of_pem_file.pem" -N -L 8888:127.0.0.1:80 bitnami@44.196.11.84

Note: You’ll need to download your default SSH key (.pem file) from your Amazon Lightsail instance before running this command. Check out my tutorial on how to download your PEM file in Amazon Lightsail.

Step 3: Access the service

Leave the terminal open and visit:

http://localhost:8888/phpmyadmin

Step 4: Close the tunnel

When finished, simply close the terminal window.