In this tutorial, we will see how to Connect AWS EC2 Instance using Putty (Windows Operating system).
Connect AWS EC2 Instance using Putty:
- I am assuming that you have already installed Putty on your Windows operating system. If you haven’t done yet, follow our previous tutorials to install the putty before going further this example.
- You have your EC2 instance running under AWS dashboard.
- And you have downloaded the EC2 key pair (.pem) file in your local machine.
1. Open PuTTY gen Tool:
Putty doesn’t support the .pem format file so that we have to convert the .pem file to PPK (PuTTY Private Key) file. To do this, we have to use the PuTTY gen tool.
Search for PuTTY gen in your windows search bar.
2. Generate Private key file:
Open PuTTY gen and click on the Load button and browse the .epm file to load.
You would see the below success message.
Click on the OK button. Select SSH-1 (RSA) and click on the Save private key button to save the private key in your local machine.
Browse your location to save private key and name it.
Note: We will dump this file into PuTTY in further steps.
Save Private Key.
Now the primary key file has been generated let’s use this file to connect our AWS EC2 instance using PuTTY.
3. Know your AWS S3 user:
To communicate with an EC2 instance, you should have a hostname. If you know your EC2 instance hostname, it’s excellent; if you do not know, you can get it from here.
Go to the EC2 Dashboard -> Instances -> and Click on Connect button.
Then you would see the below information.
The above highlighted is my EC2 instance hostname; now let’s connect to the AWS EC2 instance through PuTTY.
4. Load Private key into PuTTY:
Open the PuTTY and give your EC2 instance host name in Host Name text box.
And then go to Connection -> SSH -> AUTH
Provide the private key file by clicking on the Browse button.
Click on Open button, then if everything configured well you would see your EC2 instance box like below.
Happy Learning 🙂