26 lines
1.1 KiB
YAML
Executable File
26 lines
1.1 KiB
YAML
Executable File
|
||
services:
|
||
openssh-server:
|
||
image: ghcr.io/linuxserver/openssh-server:latest
|
||
container_name: tunnelConnector
|
||
hostname: openssh-server
|
||
network_mode: host
|
||
ports:
|
||
- "2222:2222" # publish container’s 2222 to host 2222
|
||
- "9000:9000" # publish container’s 9000 (for reverse tunnel)
|
||
|
||
environment:
|
||
- PUID=1000 # set to your user id on the host
|
||
- PGID=1000 # set to your group id on the host
|
||
- TZ=Europe/Zurich # or your timezone
|
||
- PASSWORD_ACCESS=false
|
||
- USER_NAME=tunnel # optional: set a custom SSH username (default: linuxserver.io)
|
||
- SUDO_ACCESS=false # optional: set true to grant sudo (consider security)
|
||
volumes:
|
||
# Persisted config folder (recommended by the image)
|
||
- ./server:/config
|
||
# Explicit (and clear) one-file mounts; keep them for readability/intent
|
||
#- ./server/sshd_config:/config/ssh/sshd_config:ro
|
||
#- ./server/authorized_keys:/config/.ssh/authorized_keys:ro
|
||
restart: unless-stopped
|