Openssh-server setup, can't login

Hello I’m trying to setup a remote ssh container to setup a remote developement environement for me and my friends.

I tried to use the openssh-server image a give it access to the folder with the app files but i’m note able to ssh into it even on my own pc.

My compose.yml:

version: '3'
      image: httpd:latest
      container_name: school_web
      restart: unless-stopped
        - "./web:/usr/local/apache2/htdocs"
        - "./conf/httpd.conf:/usr/local/apache2/conf/httpd.conf"
        - proxy
        - "traefik.enable=true"
        - "traefik.http.routers.apache.entrypoints=web, websecure"
        - "traefik.http.routers.apache.rule=Host(`mydomain.tld`) || Host(`www.mydomain.tld`)"
        - "traefik.http.routers.apache.tls=true"
        - "traefik.http.routers.apache.tls.certresolver=resolver"
        - ""
        - ""
        - ""

      container_name: school_ssh
      hostname: ssh.mydomain.tld #optional
        - PUID=0
        - PGID=0
        - TZ=America/Toronto
          #- PUBLIC_KEY=yourpublickey #optional
          #- PUBLIC_KEY_FILE=/path/to/file #optional
          #- PUBLIC_KEY_DIR=/path/to/directory/containing/_only_/pubkeys #optional
          #- PUBLIC_KEY_URL= #optional
        - SUDO_ACCESS=false #optional
        - PASSWORD_ACCESS=true #optional
        - USER_PASSWORD=testpasswd #optional
          #- USER_PASSWORD_FILE=/path/to/file #optional
        - USER_NAME=testuser #optional
        - "./web:/home/web"
          #- /path/to/appdata/config:/config
        - "2222:2222"
      restart: unless-stopped
        #- proxy

    external: true

when i try to ssh into it:

PS C:\Users\me> ssh -p 2222 testuser@
testuser@'s password:
Permission denied, please try again.
testuser@'s password:
Permission denied, please try again.
testuser@'s password:
testuser@ Permission denied (publickey,password,keyboard-interactive).

My logs:

# docker logs school_ssh
[migrations] started
[migrations] no migrations found

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by

To support LSIO projects visit:


User UID:    0
User GID:    0

User name is set to testuser
sudo is disabled.
sshd is listening on port 2222
User/password ssh access is enabled.
[custom-init] No custom files found, skipping...
[] done.

uname -mr && docker version:

5.15.0-82-generic x86_64
Client: Docker Engine - Community
 Version:           24.0.5
 API version:       1.43
 Go version:        go1.20.6
 Git commit:        ced0996
 Built:             Fri Jul 21 20:35:18 2023
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
  Version:          24.0.5
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.6
  Git commit:       a61e2b4
  Built:            Fri Jul 21 20:35:18 2023
  OS/Arch:          linux/amd64
  Experimental:     false
  Version:          1.6.22
  GitCommit:        8165feabfdfe38c65b599c4993d227328c231fca
  Version:          1.1.8
  GitCommit:        v1.1.8-0-g82f18fe
  Version:          0.19.0
  GitCommit:        de40ad0

my frist thought was that the config might be required but I’m not even sure which volume to include in it…

I’m trying to connect to it with a password without an id so i was wondering if its required?

IIf anyone know what I’m doing wrong or guide me into finding my error that would be a huge help

Share your docker compose or docker run command and your full container logs (they start with our ascii logo) also include the output of uname -mr && docker version

I included it in the edit, sorry I’m use to press ctrl+[ENTER] to do a line break and it posted instead, I’m new to this forum…

your volumes are wrong, you must have a /config path, as per the readme.
We do not support a PUID or PGID of 0 in our containers.

I would start there, to get a supported config, then re-test.

thank you that worked, i had the puid and pgid at 0 since i created th files with root but i changed the owner and the set and it all worked, but it doesn’t seems to be what i need for my use case. I want to use it with the remote ssh extension on vscode but it keeps warning me that somes lib are missing and the connections fails afterward. I’ll have to look for another solution

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.