password define for ssh connection into docker container
<p>I would like to connect with SSH into my docker container. For that I created image with this Dockerfile and this command <code>docker build -t test/toto .</code> :</p>

<pre><code>FROM ubuntu:14.04.4
MAINTAINER Darkomen &lt;darkomen@xxx.com&gt;

# Let the conatiner know that there is no tty
ENV DEBIAN_FRONTEND noninteractive

RUN sudo apt-get -y update

RUN sudo apt-get -y install software-properties-common python-software-properties
RUN sudo add-apt-repository main
RUN sudo add-apt-repository universe
RUN sudo add-apt-repository restricted
RUN sudo add-apt-repository multiverse

RUN sudo apt-get -y update

#RUN sudo apt-get -y install linux-headers-$(uname -r) build-essential
RUN sudo apt-get -y install linux-headers-generic build-essential
RUN apt-get -y install zlib1g-dev libssl-dev libreadline-gplv2-dev
RUN apt-get -y install curl unzip
RUN apt-get -y install software-properties-common
RUN apt-get -y install gnupg2

# others tools
RUN sudo apt-get -y install nano
RUN sudo apt-get -y install vim
RUN sudo apt-get -y install aptitude
RUN sudo apt-get -y install git
RUN sudo apt-get -y install openjdk-7-jdk
RUN sudo apt-get -y install whois
RUN sudo apt-get -y install dos2unix

# SSH
RUN apt-get -y install openssh-server
RUN mkdir -p /var/run/sshd
RUN echo 'root:screencast' |chpasswd

EXPOSE 22
CMD    /usr/sbin/sshd -D
</code></pre>

<p>next I launched my container with this image with this command : <code>docker run test/toto -p 42000:22</code></p>

<p>My container run perfectly and I launch this command for enter into this container : <code>docker run -dt -p 42000:22 test/toto</code></p>

<p>Now my docker-machine and docker container (based on my dockerfile) run. I can view that because <code>docker ps -a</code> tell me that : </p>

<pre><code>CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                        PORTS                   NAMES
a28ad08fd393        test/toto           "/bin/sh -c '/usr/sbi"   22 minutes ago      Up 22 minutes                 0.0.0.0:42000-&gt;22/tcp   admiring_feynman
</code></pre>

<p>For connecting in my container I launch this command : <code>ssh root@192.168.99.100 -p 42000</code></p>

<p><em>But it tell me to enter a password. I try lot of thing but nothing run. What I do forget in my process of creation and configuration docker ?</em></p>

<p>192.168.99.100 is the IP return by the <code>docker-machine inspect</code> command</p>

<p>I also tried to change root password into my container and repeat ssh command access. But nothing change. I can't connecting to container.</p>

<p><strong>technical information:</strong></p>

<ul>
<li>OS : windows 7 Pro</li>
<li>Docker version : 1.12.2 build bb80604</li>
<li>Docker system : docker toolbox (based on VirtualBox)</li>
<li>VirtualBox version : 5.0.14r105127</li>
</ul>