Background
When you have created and launched an AWS Linux Elastic Cloud Compute (EC2) instance, you need to be able to connect to it from your computer using the SSH protocol. This data recipe will use the Mac Terminal window command line.
Prerequisites
- You must have an AWS account. If you don’t have an account, create one now. Note: You will need to provide credit card information for your new account.
- You will need to create and launch a Linux EC2 instance to connect to. Instructions for this are found in the How to Create a Basic Elastic Cloud Compute (EC2) Instance data recipe.
Connect to an EC2 Instance using SSH
- In the AWS EC2 Management Console, click on Instances in the left menu (1) under EC2 Dashboard.
- Click on the Connect button (2) to open the Connect To Your Instance window.
- You will copy and paste information from this window to your Mac Terminal window later.
- Next, open a Terminal window on your Mac and navigate using the cd (change directory) command to the folder containing the private key file (.pem) created during the EC2 configuration process. This is usually in the Downloads folder unless you moved the file to another folder.