Connect with Linux EC2 instance using Putty in AWS
Following are the steps to connect with Linux EC2 instance using Putty:
1. For connect with Linux through putty, We need to convert private key of Amazon Web Service from format Private key format(.pem) to putty format(.ppk).
Use Putty Key Generator for convert it.Open Putty Key Generator
2. Select the RSA option from last line and Load the private key generated from AWS window.
Load Private Key –> Select all files option –> select your private key
3. Select Save Private key option to Save it.
4. Select the path and save that file to use it for login in Putty window.
5. Open the Putty Window and select SSH for connectivity with AWS EC2 instance.
6. In the Host Name field, enter user_name@public_dns_name.
Note:
1. Different platform has different username.
2. You can check connectivity setting from AWS console by connect button in instances tab.
Following are the list of username with different platform
For Amazon Linux 2 or the Amazon Linux AMI, the user name is ec2-user.
For a Centos AMI, the user name is centos.
For a Debian AMI, the user name is admin or root.
For a Fedora AMI, the user name is ec2-user or fedora.
For a RHEL AMI, the user name is ec2-user or root.
For a SUSE AMI, the user name is ec2-user or root.
For an Ubuntu AMI, the user name is ubuntu.
7. In my case, it’s RHEL then username is ec2-user@hostname as follows:
8. Use Private key generated in above steps to login the EC2 instance.
Go to left side panel and expand Connection –> SSH —> AUTH
In AUTH load the private key with browser button.
9. Press OPEN button to make connection with instance.
10. Connection seems to be successfully established.