title: How do I SSH to a Docker in Mac container
body: <p>I am running Docker for Mac (Version 1.12.0-rc2-beta16 (Build: 9493)).</p>
  
  <p>I have pulled an image from my local repository, and used 'docker run -d' to create a container. Using 'docker ps' I obtained the 'CONTAINER ID', and then used 'docker inspect &lt;CONTAINER_ID&gt;| grep IPA' to obtain the IP address for the running container.</p>
  
  <p>I now want to connect to the container using SSH with 'ssh root@&lt;IP address&gt;' but the command gives the following error: 'Operation timed out'.</p>
  
  <p>Further investigation shows that I can not ping the &lt;IP address&gt; -> 'Request timeout for icmp_seq 0'</p>
  
  <p>How can I connect to the container using SSH? What is the correct command?</p>
  
  <p>UPDATE: This IS NOT a duplicate (as stated above). The entry that begins "The scenario you described" is the correct solution.</p>