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

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

If you have not already done so, you should register for an Amazon EC2 account. Follow the instructions provided to generate and save your login credentials.

For this tutorial, we will use the AWS Management Console. Login to the Management Console. On the home screen, make sure the tab EC2 is selected. Your screen will look something like this (with likely all zeros in the “My Resources” section):

Dashboard

Click on the “Launch Instances” button. You will be presented with series of default machine images.  Choose the “Basic Fedora Core 8″ Image. Note that there is an option that has the LAMP stack (Linux, Apache, MySql, PHP) already configured. For the sake of this tutorial, we are going to do it from scratch. For practical reasons, I like to control my install setup rather than going with pre-configured options anyway.

PickInstance

Now, enter in a name for the key you would like to create, and save it in a secure place on your local machine. We will need it for SSH login purposes later:

MakeKey

Now we will setup basic firewall access for SSH (we will fix the web server and database firewall access later):

ConfigureFirewall

Now, enter 1 for the number of instances, and select Launch!

LaunchInstance

It make take a few minutes for your instance to start up. Once the Instances screen shows a status of  “running”, click on your server to see its configuration details. We are particularly interested in the Public DNS that was assigned. Make a note of this.

PublicDNS

Now we have everything we need to login and manage our server through SSH. Continue on to our next tutorial on “Loging in to an Amazon EC2 Instance Using PuTTY