Loading
spacer

Friday, July 31, 2009

Connecting to AWS EC2 (Linux) Instance With PuTTY via SSH

In order to connect to an Amazon Web Services EC2 Linux instance using PuTTY over SSH you must generate a PPK file from your private key, then import the PPK to PuTTY.  PuTTY does not natively support the private key format generated by Amazon EC2, therefore PuttyGen must be used to convert keys to its internal format.

First, associate the private key (<keyname>.PEM) with the instance to which you want to connect using PuTTYgen.  Click on the Load button and browse to the location of your private key (you will probably have to change the file type to All Files (*.*)).  If all goes well you will see the message "Successfully imported foreign key. . ."

spacer








Click OK, then click Save Private Key.

spacer

Click Yes when PuTTYgen prompts you about saving the key without a passphrase.

spacer







Save the key as <keyname>.ppk.

Next launch Putty to open an SSH session and tell Putty to use that PPK file -- NOT the PEM file! Expand connection, SSH, and select Auth. Click the browse button next to the Private key file for authentication: field, and select the .PPK file you just created with Puttygen.

spacer

Under category on the left go back to Session and Save the session.  Then click Open to connect.

spacer

Possible error messages with incorrect credentials.
* Putty failed: "Disconnected: No supported authentication methods available"
* Server refused our key

Keywords:


aws ssh instance
connecting to aws instance with putty
ec2 putty
how do you use putty with aws instance
access aws using putty
aws key file putty puttygen
aws putty
aws putty ppk pem
aws puttygen
connect to aws instance with putty

34 comments:

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.