The default method to access Linux EC2 instances on AWS is via SSH, and only the public-key authentication method is configured on the EC2 instances.
The public SSH key is added automatically to the EC2 instance when created, and you should be given the SSH private key in PEM format when creating the EC2 instance. The same is true for either Red Hat or Ubuntu-based EC2 instances.
SSH client is typically included in the default installation of Linux or other Unix-based operating systems, but not so in some versions of Windows. One popular SSH client that you can use to log in to your Linux EC2 instances from Windows is PuTTY.
Steps to SSH to Linux AWS EC2 instance using PuTTY:
Make sure the security group of your EC2
instance is configured to allow SSH
connection from your current host, or use a VPN
or proxy server if necessary.
Convert the provided PEM
private key file to PPK
(PuTTY Private Key
from the official website.
Enter the Host Name
or IP Address
of your ec2
Go to Connection
from the sidebar menu.
Click on the Browse
button to look for your PuTTY Private Key
Select your PuTTY Private Key
from the stored location and click on the Open
Click on the Open
button to start the connection.
if a security alert pops up as this is your first connection to the server and the server's key fingerprint is not in your PuTTY
Enter the username that you want to connect as and press enter.
Enter the passphrase for the key if a passphrase protects your key.
You should now are logged in using the public key authentication to the system.
Discuss the article:
Comment anonymously. Login not required.