Activities

February 2011
M T W T F S S
« Jan   Mar »
 123456
78910111213
14151617181920
21222324252627
28  

Amazon EC2 : Linux AMI ssh login from Windows

Recently I had setup few Linux AMI in Amazon. As I’m using windows desktop, It’s very difficult to use the .pem file directly to work with putty. So I need to have use Linux distros for getting ssh access.

During the instance setup time you may ask to create/use a private to get the initial ssh login on Linux and the file name(.pem) is download automatically once you had created it. The following are the important key you remember during the amazon setup,

1. Secure your private key (.pem) file downloaded for the server access. Use the permission 700 in Linux.
2. You need to create a custom “security group” and set ssh has limited access. Also recommend to limit the ftp access to your known network.
3. Use the Linux AMI ami-76f0061f ( for small/macro instance) and ami-b2ed18db (for Large instance). Both AMI using EBS storage.
a. ami-76f0061f –> 8GB (This AMI requires ssh patch fix if you are getting ” Server refused our key ” errors. Build a private AMI once you had completed the configuration)
b. ami-b2ed18db —> 30GB
4. Use elastic fox( FF plug-ins) to manage “security group” especially you have requirements to open specified port range ( passive port range setup).

Here we go,

Download putty.exe, puttygen.exe and pagent.exe from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Amazon EC2 login, using puttygen,
Follow the screens,

1. Load the .pem file in to the puttygen

2. Save the private key from it

3. Save the Privately and you will be prompted a confirmation that you are not using a pass phase, Ignore it.

4. Open Putty the type the server ip and user name, Amazon AMI has a sudo user named ec2-user. and click on “auth (SSH –> Auth) and choose the file that created on puttygen.exe program.

5. Click okay button to login !!

Now you have logged in to Amazon Linux box 🙂

b. Login using PAgent.
It’s fairly easy if you have provided putty private key file (.ppk).
1. Double click on the pagent (Putty Agent) and it’s run on the task bar.
2. Find your private key generated using putty gen/provided private key. And load it
3. Open putty and set “ec2-user@. it will lead you simply log in.

1 comment to Amazon EC2 : Linux AMI ssh login from Windows

  • Davinci

    Honestly I’m amazed and how many web sites describe out to log in using putty but none of them work. I managed to log in using Elasticfox only after change a bunch of settings but I want to run the putty command myself but I can’t.

    I know it’s possible I just do not see how I have the right ppk file the only problem is getting putty to work.

    No one has documented how to make it work correctly.

    I am only using linux because I have no choice if I did would not use it because this kind of stuff is normal in the linux world 100 ways to do something none of them documented correctly.

    If you can give me the command putty command lines params Yes I have looked for them and the documentation is so fragmented and useless it’s not funny! Yet I am laughing when I think about it.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>