title: How to connect to Amazon EC2 instance?
body: <p>After I created a ubuntu VM(Amazon EC2 instance), I see below entry in "view instances":</p>
  
  <p>I see public dns as <code>Public DNS: ec2-13-58-17-118.us-east-2.compute.amazonaws.com</code></p>
  
  <p>Instance:  <code>i-08c551d9713dfcd06 (ubuntu_VM)</code></p>
  
  <p>Security groups: <code>sg_ubuntu</code>. <code>view inbound rules</code>. <code>view outbound rules</code></p>
  
  <hr>
  
  <p>To connect to this Amazon EC2 instance(ubuntu VM), am using below syntax from my ubuntu laptop:</p>
  
  <p><code>ssh -i "ubuntu_key.pem" ubuntu@ec2-13-58-17-118.us-east-2.compute.amazonaws.com</code></p>
  
  <p>and it works, but I do not know the reason, for its working</p>
  
  <p>I understand that <code>ec2-13-58-17-118.us-east-2.compute.amazonaws.com</code> is domain name</p>
  
  <hr>
  
  <p>1) What is <code>ubuntu</code> in <code>ubuntu@ec2-13-58-17-118.us-east-2.compute.amazonaws.com</code>?</p>
  
  <p>2) Why Amazon EC2 instance creation process does not ask for assigning hostname to the EC2 instance, on aws website? after sshing, I see some dynamic hostname assigned(<code>ip-172-31-30-203</code>) which is not good for me...</p>
  
  <p>3) What is security group? amidst creation of EC2 instance...</p>