There are two ways to access a Lightsail Linux instance.
One is using our browser-based SSH client. This method is easy and convenient, but copy and paste operations require an intermediate step. For more information on using SSH via the browser read this article.
You can access your Lightsail instances using your preferred SSH client such as the built in terminal on a Mac or PUTTY on Windows. In order to do this you will need to download your SSH key from Lightsail. You’ll also need to be aware of the username for each instance (for these labs the username is provided in the instructions), as well as the instance IP.
To use your own SSH client follow these steps:
1) From the Lightsail home page click on Account and select Account
2) On the horizontal menu select SSH Keys
3) You will see a list of available keys. Lightsail will create a default key for any region in which you’ve previously deployed an instance. Choose the key you wish to use and click Download - make a note of where the .pem file was downloaded
The key file will have the extension .pem and will be named LightsailDefaultPrivateKey-region.pem** - where region is the region from which you downloaded the key. For instance LightsailDefaultPrivateKey-us-east-1.pem.
While default keys may share the same name, they are unique for each Lightsail account.
4) Obtain the Public IP address of your lightsail instance. This can be found on the card for the instance on the Lightstail home page.
5) Make sure you know the username for the instance you are accessing. For instance the MEAN and Node.js instances you will be using have the username bitnami and the Ubuntu instance you will be using has the username ubuntu
6) Issue the SSH command to access the instance. For instance on a Mac or Linux machine the following command would use your default key from us-east-1 region to log into an instance with an IP of 355.355.355.355 (this is not a real IP, of course) with the username bitnami
ssh -i ~/Downloads/LightsailDefaultPrivateKey-us-east-1.pem firstname.lastname@example.org
If you get an error that the permissions are too permissive on your private key, you will need to change them by issuing the following command (substituting in the correct path to your private key)
chmod 600 ~/Downloads/LightsailDefaultPrivateKey-us-east-1.pem
For Windows users this doc explains how to to do setup PUTTY to access Lightsail instances