title: unable to connect to aws machine : operation timed out
body: <p>I am new to AWS and created key pair correctly  </p>
  
  <pre><code>@air~/.ec2 - 14:25:10$ ec2-add-keypair mykey &gt; mykey.pem  
  </code></pre>
  
  <p>and run the instance with same key  </p>
  
  <pre><code>@air~/.ec2 - 14:25:15$ec2-run-instances ami-a29243cb -k mykey -t t1.micro  
  </code></pre>
  
  <p>when try to connect to machine I see  </p>
  
  <pre><code>@air~/.ec2 - 14:25:22$ ssh  -v -i mykey.pem ec2-user@ec2-21-20-42-115.compute-1.amazonaws.com
  OpenSSH_5.6p1, OpenSSL 0.9.8r 8 Feb 2011
  debug1: Reading configuration data /etc/ssh_config
  debug1: Applying options for *
  debug1: Connecting to ec2-user@ec2-21-20-42-115.compute-1.amazonaws.com [21.20.42.185] port 22.
  ssh: connect to host ec2-user@ec2-21-20-42-115.compute-1.amazonaws.com port 22: Operation timed out
  </code></pre>
  
  <p>I have even tried <code>root@ec2-21-20-42-115.compute-1.amazonaws.com</code> but no luck  </p>
  
  <p>How can I fix this?</p>