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'
services:
apache:
image: httpd:latest
container_name: school_web
restart: unless-stopped
volumes:
- "./web:/usr/local/apache2/htdocs"
- "./conf/httpd.conf:/usr/local/apache2/conf/httpd.conf"
networks:
- proxy
labels:
- "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"
- "traefik.http.services.apache.loadbalancer.server.port=80"
- "traefik.http.services.apache.loadbalancer.server.scheme=http"
- "traefik.docker.network=proxy"
openssh-server:
image: lscr.io/linuxserver/openssh-server:latest
container_name: school_ssh
hostname: ssh.mydomain.tld #optional
environment:
- 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=https://github.com/username.keys #optional
- SUDO_ACCESS=false #optional
- PASSWORD_ACCESS=true #optional
- USER_PASSWORD=testpasswd #optional
#- USER_PASSWORD_FILE=/path/to/file #optional
- USER_NAME=testuser #optional
volumes:
- "./web:/home/web"
#- /path/to/appdata/config:/config
ports:
- "2222:2222"
restart: unless-stopped
#networks:
#- proxy
networks:
proxy:
external: true
when i try to ssh into it:
PS C:\Users\me> ssh -p 2222 testuser@192.168.18.250
testuser@192.168.18.250's password:
Permission denied, please try again.
testuser@192.168.18.250's password:
Permission denied, please try again.
testuser@192.168.18.250's password:
testuser@192.168.18.250: Permission denied (publickey,password,keyboard-interactive).
My logs:
# docker logs school_ssh
[migrations] started
[migrations] no migrations found
───────────────────────────────────────
██╗ ███████╗██╗ ██████╗
██║ ██╔════╝██║██╔═══██╗
██║ ███████╗██║██║ ██║
██║ ╚════██║██║██║ ██║
███████╗███████║██║╚██████╔╝
╚══════╝╚══════╝╚═╝ ╚═════╝
Brought to you by linuxserver.io
───────────────────────────────────────
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
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...
[ls.io-init] 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
Engine:
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
containerd:
Version: 1.6.22
GitCommit: 8165feabfdfe38c65b599c4993d227328c231fca
runc:
Version: 1.1.8
GitCommit: v1.1.8-0-g82f18fe
docker-init:
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