title: /bin/sh: /usr/sbin/sshd-keygen: No such file or directory
body: <p>I'm completely new to linux and docker concepts</p>
  
  <p>In my windows machine I boot up centos7 in virtual box</p>
  
  <p>while running docker-compose build I get</p>
  
  <pre><code> /bin/sh: /usr/sbin/sshd-keygen: No such file or directory
  </code></pre>
  
  <p>How to rectify it</p>
  
  <p>I tried to create a remote user</p>
  
  <pre><code>docker-compose.yml
  
  version: '3'
  services:
    jenkins:
      container_name: jenkins
      image: jenkins/jenkins
      ports:
        - "8080:8080"
      volumes:
        - "$PWD/jenkins_home:/var/jenkins_home"
      networks:
        - net
    remote_host:
      container_name: remote-host
      image: remote-host
      build:
        context: centos7
      networks:
        - net
  networks:
     net:
  </code></pre>
  
  <pre><code>DockerFile
  
  FROM centos
  
  RUN yum -y install openssh-server
  
  RUN useradd remote_user &amp;&amp; \
      echo "Thevenus987$" | passwd remote_user --stdin &amp;&amp; \
      mkdir /home/remote_user/.ssh &amp;&amp; \
      chmod 700 /home/remote_user/.ssh
  
  COPY remote-key.pub /home/remote_user/.ssh/authorized_keys
  
  RUN chown remote_user:remote_user -R /home/remote_user/.ssh &amp;&amp; \
      chmod 600 /home/remote_user/.ssh/authorized_keys
  
  RUN /usr/sbin/sshd-keygen
  
  CMD /usr/sbin/sshd -D
  
  </code></pre>