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
SSHD Docker Ports
Port
Protocol
Type
Purpose
55555
TCP
EXPOSED
SSH Connections
Updated: None
Files
SSHD Docker Files
Location
Purpose
/etc/ssh
SSHD configuration files
/etc/authorized_keys
Authorized keys location (cannot be changed based on container)
/data
Mounted data for users
Updated: None
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.
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