Managing an Amazon EC2 Instance Using PuTTY SSH

28 Jun, 2009  |  Written by Jon  |  under Amazon Web Services

This tutorial is part of a series on setting up Scalable Web Hosting with Amazon EC2

To login to our instance, we will use a great Telnet/SSH client named PuTTY. I currently run it on windows and it works very well. The Windows installer is available here. Install the software on your machine.

In our previous tutorial, we generated a key that we saved on our local machine. Before we use PuTTY, we have to convert that key to PuTTY’s format. In the installation pack was a program called “PuTTYgen”. Run this program. Select “Load” from the main screen and find the key that we saved when we were creating our Amazon EC2 instance. Note, the Amazon key ends with the extension .pem, so you will have to switch to show all files *.* Once the key loads, select “Save Private Key”

GenerateKey

You will get a warning about saving the key without a passphrase. Click Yes/OK

Now run the main PuTTY application. In the main Session screen, add the Public DNS for your new Amazon EC2 Instance into the Host/IP Box. You can also name your profile if you want to reuse it

PuTTYHost

Then, in the menu tree on the left, expand “SSH” under “Connection” and select “Auth”.  Click the “Browse” button in the “Private Key File” field and load the key you just created with PuTTYgen.

SelectKey

Now click the “Open” button at the bottom (or you can go back to the “Session” screen to save your configuration first). A SSH command line window will open with a prompt saying “Login As:”. Type “root” and hit enter. If you see something like this, you have successfully logged in!

LoggedIn

Share:
  • email
  • Digg
  • Twitter
  • Facebook
  • del.icio.us
  • Mixx
  • MySpace
  • NewsVine
  • Reddit
  • StumbleUpon
  • Technorati
  • BlinkList
  • Google Bookmarks
  • LinkedIn
  • Live
  • Yahoo! Buzz
  • Fark
  • Netvibes
  • Netvouz
  • Propeller
  • Yahoo! Bookmarks

2 Responses so far | Have Your Say!

  1. DeepDown  |  October 23rd, 2009 at 8:28 am #

    Saved my day, thank you

    DeepDown - Gravatar
  2. Harald  |  August 23rd, 2010 at 11:12 am #

    Putty is just an invaluable tool. Everything just … works. Thanks for the howto, I wouldn’t have thought of using puttygen.

    Harald - Gravatar

Leave a Feedback

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>