openssh-server restricted to rsync 🐳 https://hub.docker.com/r/fphammerle/rsync-sshd
Fabian Peter Hammerle 61cfa3bf39 upgrade alpine base image to v3.15.0 including upgrade of openssh-server package to v8.8p1 and rsync package to v3.2.3-r5 (see below) | 2 years ago | |
---|---|---|
.github | 3 years ago | |
CHANGELOG.md | 3 years ago | |
Dockerfile | 2 years ago | |
Makefile | 3 years ago | |
README.md | 4 years ago | |
docker-compose.yml | 4 years ago | |
entrypoint.sh | 5 years ago | |
openssh-package-log.url | 2 years ago | |
openssh-release-notes.url | 3 years ago | |
rsnapshot.conf.example | 5 years ago | |
rsync-package-log.url | 2 years ago | |
sshd_config | 5 years ago |
repo: https://github.com/fphammerle/docker-rsync-sshd
docker hub: https://hub.docker.com/r/fphammerle/rsync-sshd
SSH clients are restricted to rsync --server
commands via rrsync.
rrsync prefixes /data
to all paths (e.g., rsync ... host:/src /backup
downloads /data/src
).
$ docker run --name=rsync-sshd -p 2022:22 -e USERS=alice,bob -v rsync-data:/data:ro fphammerle/rsync-sshd
$ docker cp alice-keys rsync-sshd:/home/alice/.ssh/authorized_keys
$ docker cp bob-keys rsync-sshd:/home/bob/.ssh/authorized_keys
$ docker run --name rsync-sshd \
--publish 2022:22 --env USERS=alice,bob \
--volume accessible-data:/data:ro \
--volume host-keys:/etc/ssh/host_keys \
--volume alice-ssh-config:/home/alice/.ssh:ro \
--volume bob-ssh-config:/home/bob/.ssh:ro \
--init --rm \
fphammerle/rsync-sshd
$ rsync -av --rsh='ssh -p 2022' alice@localhost:/source /target
required capabilities: