I am a part of many online php forums and I noticed that peoples around were asking many questions like What is git? What are git commands How can we use git commands ? Some basics git commands list What is Git branching Resolve Git Merging issues So I decide to write a comprehensive article… [Read More]
When business subscribers wants to use their application programs in Amazon by using their cloud computing environment it refers to Amazon EC2. Amazon EC2 simply is a web based service in which user uses their virtual machines called instances. But if you are a windows user and you want to connect to Amazon EC2 from windows, you need to do it through PuTTY. For this you should have .pem file for the key pair when you launch your instance through putty. One more interesting thing is that PuTTY only support .ppk file instead of .pem file. So first we need to convert our .pem file into .ppk file. If you don’t have PuTTYgen and PuTTY you can Dwonload it.
Connect to Amazon Ec2 from windows
To convert your private key(.pem) into .ppk:
1. First of all you have to start the PuTTYgen.
2. After this, simply select SSH-2 RSA under the heading ‘Type of key to generate’.
3. In the 3rd step, click on to the option ‘Load’ and then PuTTYgen will display only those files which will have a .ppk extension and this happens by default. Now, if you want to see your .pem file, simply select ‘All Files’ to display so that your file can easily be located.You have to select you specified .pem file.
4.Click on ‘Save private key’ to save the file which you want to open using PuTTY format. For a simple usage on your windows press on YES when the PuTTYgen displays a warning to save the key in a passphrase.
Passphrase is basically extra protection kind of thing which saves your private key if discovered by any other. You can only use it with the help of a passphrase if you will click YES. There is a downside of using passphrase which is this, it will make automation tough because whenever anyone needs it, he has to log on or copy files to an instance.
5.Lastly, you have to specify the name for the key which you used for the key pairs like my-key-pair. Now .ppk extension will automatically be added by PuTTY.
Now, you have your own .ppk private key to use with the help of PuTTYgen. You can now connect to Amazon EC2 on windows using PuTTY’s SSH client.
To start a PuTTY Session:
Here are some of the easy steps to launch a PuTTY session into your windows :
1.One very important thing about the PuTTY session is that you can verify the RSA key fingerprint on your instance and this can be done with the help of your local system. This becomes more secure if the instance is launched by a public AMI via third party. First of all, you have to locate SSH HOST KEY FINGERPRINTS section, and have to note the RSA fingerprints. Here is one example: 1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:6f
After this one can simply compare this to the fingerprints of the instance.
If you have the first boot of the instance then you will be facilitated with SSH HOST KEY FINGERPRINTS section.
2.Now start your PuTTY and you will be able to see the ‘Category pane’, select Session and complete the following fields:
(a) Entre user_name@public_dns_name in the Host Name box. Choose suitable user name for the AMI instance like:
(b)Choose SSH under the Connection Type.
(c) Make sure that the Port is 22.
3.Now in the Category Pane, expand your Connection as well expand the SSH and then select Auth. Then complete the given steps:
(a) Click Browse.
(b) Now select the .ppk file which you have generated via your private key and click to Open.
(c) If you want to use this session in the future, you can save the steps you have followed till yet. For this purpose, select Session in the Category tree, enter the name in the Saved Sessions, and click on to Save option.
(d) Click Open to start the PuTTY session whenever you want to.
4.If you have never installed the session before, then by default a dialogue box will appear in front of you asking whether you trust the host you are connecting to or not. Don’t worry about it and click Yes.
5.Now, verify the fingerprints which you completed in the step 1 and if the fingerprint matches you can continue. If by any chance the fingerprint does not match then be sure that someone is attempting the “man-in-the-middle” attack.
6.Lastly, click on to the option Yes and a window will appear. Simply, you are connected to your instance.
[tg_social_icons style=”dark” size=”small”]