openssh-server restricted to rsync 🐳 https://hub.docker.com/r/fphammerle/rsync-sshd
dependabot[bot] 8e87f52385 build(deps): bump docker/setup-buildx-action from 3.1.0 to 3.2.0 (#70) | hai 8 meses | |
---|---|---|
.github | hai 8 meses | |
CHANGELOG.md | %!s(int64=2) %!d(string=hai) anos | |
Dockerfile | hai 9 meses | |
Makefile | %!s(int64=3) %!d(string=hai) anos | |
README.md | %!s(int64=4) %!d(string=hai) anos | |
docker-compose.yml | %!s(int64=4) %!d(string=hai) anos | |
entrypoint.sh | %!s(int64=5) %!d(string=hai) anos | |
rsnapshot.conf.example | %!s(int64=5) %!d(string=hai) anos | |
rsync-changelog.url | %!s(int64=2) %!d(string=hai) anos | |
sshd_config | %!s(int64=2) %!d(string=hai) anos |
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: