How do I connect to my Amazon Lightsail instance?
- 07/15/2020 12:54 PM
Connecting to your Amazon Lightsail instance depends on whether you ordered a Linux or Windows server. Follow the guide below for instructions on how to connect.
How to connect to Linux instance
Select your Amazon Lightsail instance from the My Services page in My NodeSpace.Select Connection Details.
macOS / Linux
Copy the SSH Private Key (4) and open a new text editor document and paste it in. We use Sublime Text, but you can use a text editor of your choice. Do not use Microsoft Word, LibreOffice Writer, or OpenOffice Writer. It should look something like this:For example, I saved my private key in my Documents directory called "nsls-test". I'll save my public key as "nsls-test.pub" and also place it in my Documents directory.
Secure your private key
Before we can connect, we need to secure our private key.Using your file manager (GUI)
If you're using your file manager, go to where you saved your private key file. Alternate click on it and select properties (or for macOS, Get Info). Find the file permissions. Remove all access to the file other than for your user account. For macOS users, click the padlock at the bottom and authenticate. Select any other user or group and press the "-" button. If you cannot remove a group, select the privilege and choose "No Access". For your user (identified by "(Me)"), make sure Read & Write is selected. It should look like the following. Click the padlock again to prevent changes from being made.Using your Terminal (Command Line)
If you prefer, you can use your Terminal. Open up your Terminal application (applies to both Mac and Linux), and navigate to where your private key is. For example, when I open my terminal, I am already in my home directory so I just have to type the command cd Documents/ and press return and I'm in my Documents directory.chmod 600 PRIVATEKEYFor example, I saved my private key as "nsls-test" so I'd type in chmod 600 nsls-test and press return.
Add Comment