18 December 2010

Can't SSH to Amazon Elastic Compute Cloud (EC2) Instance

I've decided that I'm going to learn about Amazon Elastic Compute Cloud (EC2) over this Holiday break.  I've read a few articles, listened to a few podcasts so I have an idea what it's about, just haven't actually gone thru the motions myself.

What am I going to do with a virtual machine (VM) in the cloud?  Not much quite yet.  I have some ideas but first need to figure out how things work.

So on Friday night I signed up for an EC2 account and started to follow the Getting Started Guide on the Amazon site.  As usual, things went smooth for the first few minutes but as usual, progress came to an immediate screeching.

I started an plain vanilla Basic 64-bit Amazon Linux Amazon Machine Image (AMI) just to get things going and verify that I could SSH into the thing per the getting started guide.  But when I SSH'd, nothing, nada, zip.  Timeout.


This darn thing acts like it's not running.  I started, restarted, used different AMI, mucked with security group setting without any progress.  I even edited the default security group to open the thing wide open:


Still nothing.  Did the google thing to see what other people are doing and came across a few hits in the Amazon Web Services forums where people are claiming the the web services aren't starting up correctly in the US-East zone.  Hey, that's me!  Ok, I'm not stupid, its just some tech problem.  I'll take a break and try it again in a few hours.

Few hours later:  nothing, nada, zip.  Ok, I am stupid.  I can't even log into a stupid instance.  I probably started/stopped an EC2 AMI 10 times but can't do anything with it.  This new thing I've learned is frickin' amazing.

And as usual, as soon as I've convinced myself that all hope is lost, ding.  Wait, doesn't my Westell DSL modem block SSH?  Oh, frick of course it does.  Damn it so, the last 3-4 hours of trouble was caused by my own firewall??

Of course it was.  I really hate this Verizon provided modem and keep telling myself that I'm going to buy a different one.  But this is free and I'm cheap.  So I'll keep shooting myself in the foot and someday get smarter and dump this junk.

In the Firewall->Port Forwarding menu, I just added the SSH service to a dynamic host.


And now when I launch a new instance, I get this:


Amazing.  Only hours and hours of work to launch and connect.  Let the fun begin.

What do you think? Leave a comment.