title: How to get my docker centos sshd passwordless server running?
body: <p>I'm running my docker container with:</p>
  
  <pre><code>docker run -d sequenceiq/hadoop-docker:2.6.0
  </code></pre>
  
  <p>The <a href="https://github.com/sequenceiq/hadoop-docker/blob/master/Dockerfile" rel="nofollow noreferrer">Dockerfile is here</a>. </p>
  
  <p>After it is started on my mac - I'm running <code>docker ps</code> and getting:</p>
  
  <pre><code>6bfa4f2fd3b5        sequenceiq/hadoop-docker:2.6.0   "/etc/bootstrap.sh -d"   4 minutes ago       Up 4 minutes        22/tcp, 8030-8033/tcp, 8040/tcp, 8042/tcp, 8088/tcp, 49707/tcp, 50010/tcp, 50020/tcp, 50070/tcp, 50075/tcp, 50090/tcp   kind_hawking
  </code></pre>
  
  <p>Then I'm running</p>
  
  <pre><code>ssh -v localhost -p 22
  </code></pre>
  
  <p>and I'm getting </p>
  
  <pre><code>OpenSSH_7.4p1, LibreSSL 2.5.0
  debug1: Reading configuration data /Users/User/.ssh/config
  debug1: Reading configuration data /etc/ssh/ssh_config
  debug1: Connecting to localhost [::1] port 22.
  debug1: connect to address ::1 port 22: Connection refused
  debug1: Connecting to localhost [127.0.0.1] port 22.
  debug1: connect to address 127.0.0.1 port 22: Connection refused
  ssh: connect to host localhost port 22: Connection refused
  </code></pre>
  
  <p>Assumptions: I think this is not a duplicate of the other centos sshd questions as this is a different centos version. (For those that are similar - it is doing what the potentially similar question is asking and it is not working). </p>
  
  <p>My question is: <strong>How to get my docker centos sshd passwordless server running?</strong></p>
  
  <hr>
  
  <p>Edit:
  @Andrew has been super-helpful in helping me refine my question - so here goes. </p>
  
  <p>Here is my updated <code>Dockerfile</code></p>
  
  <p>FROM sequenceiq/hadoop-docker:2.6.0</p>
  
  <pre><code>CMD ["/etc/bootstrap.sh", "-d"]
  
  # Hdfs ports
  EXPOSE 50010 50020 50070 50075 50090 8020 9000
  # Mapred ports
  EXPOSE 10020 19888
  #Yarn ports
  EXPOSE 8030 8031 8032 8033 8040 8042 8088
  #Other ports
  EXPOSE 49707 2122
  
  EXPOSE 9000
  
  EXPOSE 2022
  </code></pre>
  
  <p>Now I'm building this with:</p>
  
  <pre><code> sudo docker build -t my-hdfs .
  </code></pre>
  
  <p>Then I'm running this with:</p>
  
  <pre><code>sudo docker run -d -p my-hdfs 
  </code></pre>
  
  <p>Then I'm checking the processes with:</p>
  
  <pre><code>sudo docker ps
  </code></pre>
  
  <p>with a result like:</p>
  
  <pre><code>d9c9855cfaf0        my-hdfs             "/etc/bootstrap.sh -d"   2 minutes ago       
  Up 2 minutes        0.0.0.0:32801-&gt;22/tcp, 0.0.0.0:32800-&gt;2022/tcp, 
  0.0.0.0:32799-&gt;2122/tcp, 0.0.0.0:32798-&gt;8020/tcp, 0.0.0.0:32797-&gt;8030/tcp, 
  0.0.0.0:32796-&gt;8031/tcp, 0.0.0.0:32795-&gt;8032/tcp, 0.0.0.0:32794-&gt;8033/tcp, 
  0.0.0.0:32793-&gt;8040/tcp, 0.0.0.0:32792-&gt;8042/tcp, 0.0.0.0:32791-&gt;8088/tcp, 
  0.0.0.0:32790-&gt;9000/tcp, 0.0.0.0:32789-&gt;10020/tcp, 0.0.0.0:32788-&gt;19888/tcp, 
  0.0.0.0:32787-&gt;49707/tcp, 0.0.0.0:32786-&gt;50010/tcp, 0.0.0.0:32785-&gt;50020/tcp, 
  0.0.0.0:32784-&gt;50070/tcp, 0.0.0.0:32783-&gt;50075/tcp, 0.0.0.0:32782-&gt;50090/tcp   
  agitated_curran
  </code></pre>
  
  <p>Then to get the IP address I'm running:</p>
  
  <pre><code>docker inspect --format '{{ .NetworkSettings.IPAddress }}' d9c9855cfaf0
  </code></pre>
  
  <p>with a result like</p>
  
  <pre><code>172.17.0.3
  </code></pre>
  
  <p>Then I'm testing it with:</p>
  
  <pre><code>ssh -v 172.17.0.3 -p 32800
  </code></pre>
  
  <p>This gives a result:</p>
  
  <pre><code>OpenSSH_7.4p1, LibreSSL 2.5.0
  debug1: Reading configuration data /Users/User/.ssh/config
  debug1: Reading configuration data /etc/ssh/ssh_config
  debug1: Connecting to 172.17.0.3 [172.17.0.3] port 32800.
  
  debug1: connect to address 172.17.0.3 port 32800: Operation timed out
  ssh: connect to host 172.17.0.3 port 32800: Operation timed out
  </code></pre>
  
  <p>My question is: <strong>How to get my docker centos sshd passwordless server running?</strong></p>