Managing an Amazon EC2 Instance Using PuTTY SSH
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”
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
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.
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!