title: Login to Amazon EC2 via ssh
body: <p>I have a question and am stuck at something. I recently created AWS EC2 Ubuntu instance with default settings. I have an Ubuntu machine locally as well and so far I managed to connect successfully to the Ubuntu instace with this command</p>
  
  <pre><code>ssh -i /var/www/my-key-pair.pem ec2-user@ec2-198-51-100-1.compute-1.amazonaws.com
  </code></pre>
  
  <p>However I want to know if there is a simpler way to login to ssh without passing the private key everytime I login and add its ip to my <code>~/.ssh/config</code> so that I could login as easily as <code>ssh ubuntu@some.ip.number</code>. By the way I am using AWS free tier package.</p>