title: EC2: "Connection refused" to all instances after changing ownership of /var
body: <p>I recently changed the ownership of the <strong>/var</strong> directory in my EC2 instance from "root" to "ec2-user", and once I did that, I was unable to SSH back into the server (even though port 22 is open in the security group). Now when I try to connect through that instance or any new instance, I get this message:</p>
  
  <pre><code>Error connecting to ________, reason:
  -&gt; Connection refused
  </code></pre>
  
  <p>When I check the system logs, I see this: </p>
  
  <blockquote>
    <p>Starting sshd: /var/empty/sshd must be owned by root and not group or
    world-writable.</p>
    
    <p>[FAILED]</p>
  </blockquote>
  
  <p>Any ideas on how I can get back into the server? I tried creating a new instance and mounting the older volume there, but I can't even SSH into the new instance, as I get that same "Connection refused" message. </p>