wodby / php

Generic PHP docker container images
MIT License
152 stars 103 forks source link

SSH configuration issue #76

Closed ludal74 closed 5 years ago

ludal74 commented 5 years ago

Hi,

I'm trying to use SSHD container but it fail with the message :

Could not load host key: /etc/ssh/ssh_dsa_key
Could not load host key: /etc/ssh/ssh_ecdsa_key
Could not load host key: /etc/ssh/ssh_ed25519_key
Server listening on 0.0.0.0 port 22.
Server listening on :: port 22.

Here is my container config in docker-compose.yml :

sshd:
    image: wodby/drupal-php:$PHP_TAG
    container_name: "${PROJECT_NAME}_sshd"
    command: sudo /usr/sbin/sshd -De
    environment:
      SSH_PUBLIC_KEYS: |-
        ["MY_PUBLIC_KEY"]
    volumes:
      - ./:/var/www/html
      - PATH_TO_PRIVATE_KEY:/home/wodby/.ssh/id_rsa
    ports:
      - '2222:22'
    depends_on:
      - php

Did I missed something ?

Thank you for your reply

csandanov commented 5 years ago

It doesn't look like it fails, sshd just couldn't load some keys since you provided only rsa but it seems to have started

ludal74 commented 5 years ago

You’re right @csandanov. The container is working even with this warnings. Thank you for the answer.