Join Amazon Student FREE Two-Day Shipping for College Students!
4330

Connecting to Amazon EC2 Linux Instance from Windows Using PuTTY

Connecting to Amazon EC2 Linux Instance from Windows Using PuTTY

PuTTY does not natively support the private key format (.pem) generated by Amazon EC2. If you load the .pem formet private key directly to PuTTY you will get error message: Unable to use key file "***.pem" (OpenSSH SSH-2 private key).

PuTTY has a tool called PuTTYgen, which can convert keys to the required PuTTY format (.ppk). You must convert your private key into this format (.ppk) before connecting to your instance using PuTTY.

How to:

1. Install the latest version PuTTY.

2. Locate the private key.

.pem file for the key pair that you specified when you launched the instance.

3. Enable inbound SSH traffic from your IP address to your instance.

Your default security group does not allow incoming SSH traffic by default. authorize Inbound Traffic for Your Amazon EC2 Linux Instances

4. Get the public DNS name of the instance or the Public IP address.

5. Converting Your Private Key Using PuTTYgen.

  • Download the latest version PuTTYgen
  • Start puttygen.exe
  • Under Type of key to generate, select SSH-2 RSA
    puttygen-key-type
  • Load your .pem file. Click Load. By default, PuTTYgen displays only files with the extension .ppk. To locate your .pem file, select the option to display files of all types.
    puttygen-load-key
  • Click Save private key to save the key in the format that PuTTY can use. Note: You can use a passphrase to add an extra layer of protection to the private key.

6. Starting a PuTTY Session

  • Fill in the public DNS name of the instance or the Public IP address.
    putty-ip
  • In the Category pane, expand Connection, expand SSH, and then select Auth.
  • Browse and select the .ppk file that you generated for your key pair, and then click Open.
  • login in as: ec2-user or ubuntu depends on the system that you selected for the instance. You can try to login as root first and find out what login name should you use.

1 Comment

  1. Sovit says:

    Thanks! exactly what i needed.

Leave a Reply

Your email address will not be published. Required fields are marked *

 

Your browser is out-of-date. Upgrade your browser today! Internet Explorer | FireFox | Chrome

X