10.9 C
Monday, January 30, 2023

SSH and Connecting to Amazon Lightsail Instance

Before you begin, you must have Amazon Lightsail instance running. If you do not know about Lightsail and have not created the instance, you may first visit How to host WordPress Website on Amazon Lightsail 2021.

In this article, we will demonstrate how to SSH and connect to Amazon Lightsail Instance using puTTy client software. Follow the steps below in a sequence.

PuTTy Client

First of all, download and install Putty client software on your computer.

Amazon Lightsail Instance

Log in to the AWS account and open the running Lightsail instance. Note down the static IP address to use later in this article. Click the instance name to continue.

Amazon Lightsail Instance Running

Downloading Private Key File (PEM)

Download the private key that will be used later to access the Lightsail instance using the puTTy client.

Downloading the default private key file

Click the “Download” button to download the private key file with the PEM (Privacy Enhanced Mail) extension.

Private Key (PEM) downloaded

Converting Private Key from PEM to PPK

We need to convert the PEM to PPK (Putty Private Key) using the PuTTYgen app that will have already been installed with the puTTy client software. Open PuTTy Key Generator and load the downloaded PEM file.

PuTTYgen App
Loading PEM key to PuTTYgen

Once the key has been imported, it will prompt a dialogue box, click OK to continue.

PEM Key Imported to PuTTYgen

Now click the “Save private key” button, give the key a suitable name and you have the PPK on your computer that will be used to access the Lightsail instance.

Saving Private Key as PPK

PuTTy Configuration

To open SSH connection with the Lightsail instance, we need to do certain configurations to the puTTy client. Following are the steps: 1) Provide Static IP, 2) Provide username, 3) Upload PPK key, 4) Configure Tunnel, and 5) Save puTTy Session.

Providing Static IP to PuTTy
Providing username to puTTy
Loading PPK file to PuTTy
Adding Tunnellig information to access phpMyAdmin
Saving PuTTy Session

SSH to Lightsail Instance using PuTTy

Once you have configured the puTTY client, click Open button to create SSH session to the Lightsail instance. We will see the command-line interface to our instance.

Now we need the bitnami instance password to access PHPMyAdmin, we can get it by issuing the following command on CLI.

cat bitnami_application_password

Opening PHPMyAdmin

We can access phpMyAdmin by requesting the following URL on the browser. The default username is root and the password is bitnami instance password that we got in step 10.

Login Window to phpMyAdmin
phpMyAdmin after successful login
Gulraeez Gulshan
Gulraeez Gulshan
I am an engineer, programmer, tech-savvy professional, and very passionate about the latest technologies for the modern web, mobile, cloud-native, machine learning, and network automation. I have a bachelor's degree in Electronics Engineering and a Master's degree in Computer Science and Information Technology from a renowned university in Pakistan. I have not limited myself to a certain set of skills in this era where technology is in a state of flux; I have experience working with an extensive range of technologies and learning daily to update my skills and adapt to the latest technologies

Related Articles


Please enter your comment!
Please enter your name here

Latest Articles