SSHD Docker Setup

SSHD using docker to enable dynamic read-only chroot directories.

See SSHD Docker and Documentation. This assumes a similiar setup to SSHD Linux Setup with the additional of chrooting users into read-only directories.

Ports

Files

Docker Creation

  • The UID/GID for the defined SSH user should be set to a user/group that has access to your media.

  • See Basic Configuration for example configuration.

Docker Compose
sshd:
  image: panubo/sshd:latest
  restart: unless-stopped
  logging:
    driver: syslog
    options:
      tag: sshd
  ports:
    - '55555:22'
  environment:
    - SSH_ENBALE_ROOT=false
    - SSH_ENABLE_PASSWORD_AUTH=false
    - SFTP_MODE=true
    - SFTP_CHROOT=/data
    - GATEWAY_PORTS=false
    - TCP_FORWARDING=false
    - SSH_USERS={USER}:{UID}:{GID}
    - TZ=America/Los_Angeles
  volumes:
    - /data/sshd/sshd:/etc/ssh
    - /data/sshd/authorized_keys:/etc/authorized_keys
    - /data/media:/data/media:ro
    - /etc/localtime:/etc/localtime:ro