Connecting to your EC2 Linux Instance from Windows:

In order to connect from a Windows machine to your Linux EC2 instance via SSH, you need to install:

Download and install the two programs from the link above.

PuTTY does not natively support the private key format (.pem) generated by Amazon EC2. That is why you need PuTTYgen to convert your private key to the PuTTY format (.ppk).

Convert your private key

  1. Open PuTTYgen and make sure that RSA is selected under Type of key to generate.
  2. Click on Load and select the option to display files of all types.
  3. Select the .pem file for the key pair that you specified when you launched your instance, and then choose Open. Click OK.
  4. Choose Save private key to save the key in the format that PuTTY can use. PuTTYgen displays a warning about saving the key without a passphrase. Choose Yes.

  5. Specify the same name for the key that you used for the key pair. PuTTY automatically adds the file extension.

Your private key is now in the correct format for use with PuTTY. You can now connect to your instance using PuTTY's SSH client.

Start PuTTY session

Open PuTTY and complete the Host Name field with the form:

ubuntu@<public_dns_name>

Which can be for example:

[email protected]

Make sure that Port is 22 and Connection type is SSH.

In the Category pane, expand Connection, expand SSH, and then choose Auth. Click on Browse, select the .ppk file that you generated from your key pair using PuTTYgen, and then choose Open.

Optionally, you can save the session information for future use. Choose Session in the Category tree, enter a name for the session in Saved Sessions , and then choose Save.

Once done, you can click on Open to start the PuTTY session.

If this is the first time you have connected to this instance, PuTTY displays a security alert dialog box that asks whether you trust the host you are connecting to. Choose Yes.

A window opens and you are now connected to your instance.

Reference: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html

results matching ""

    No results matching ""