There are many articles we can found for to connect to amazon ec2 machine though ssh. But all I found for windows. Using putty and putty key gen tool you can connect to amazon ec2 linux machine.
How to connect amazon instance through linux command prompt
If you are having the linux box and you want to connect to amazon ec2 machine then that is very easy. You just need to install the following package to connect to amazon ec2 machine.
Install the ec2-api-tools on linux or mac machine. use the following command.
# yum install ec2-api-tools
When you first try to create the amazon instance that time you need to create the key pair file. You got the .pem file as key pair file. That file is very important for connecting to amazon instance machines.
Keep your key pair file(.pem ) in safe location and dont give this file anyone. Go to directory where you kept the key pair file.
#ssh -i ec2-YOURKEY.pem root@ec2-51-18-49-55.compute-1.amazonaws.com
Using above command you can connect to amazon EC2 linux boxes.
Which OS you are using?