This container allows rsync over ssh with public key usage. This is mainly a tool for myself, but maybe you need it too.
-e KEY_PASSPHRASE=YourKeyPassword-e KNOWN_HOSTS="sub.domain.com,123.45.67.8 exdsa-sha2-xxx ..."-v /home/user/backup/backup.priv:/root/key:ro-v /home/user/backup/data:/home/data:rorsync -altDv --delete -e 'ssh -i /root/.ssh/id_rsa' "/home/data" sub.domain.com:/datadocker run -ti --rm --name backup \
-e KEY_PASSPHRASE=YourKeyPassword -e KNOWN_HOSTS="sub.domain.com,123.45.67.8 exdsa-sha2-nistp256 ..." \
-v /home/user/backup/backup.priv:/root/key:ro \
-v /home/user/backup/data:/home/data:ro \
jusito/rsync-ssh \
rsync -altDv --delete -e 'ssh -i /root/.ssh/id_rsa' "/home/data" sub.domain.com:/data
| Name | Default | Description |
|---|---|---|
| KNOWN_HOSTS | sets .ssh/known_hosts. | |
| KEY_FILE | /root/key | Location where you can mount your key. You can change it if bind mount is disabled |
| KEY_TARGET | /root/.ssh/id_rsa | Don't change please. Key is copied to this location. |
| KNOWN_HOSTS_FILE | /root/.ssh/known_hosts | Don't change please, location for known hosts |
| KEY_PASSPHRASE | Can't be empty, passphrase for KEY_FILE |
Passwords in environment variable and in particular in run is insecure. You should use at least --env-file. Keep in mind, if this key is compro
Content type
Image
Digest
Size
6.6 MB
Last updated
over 7 years ago
docker pull jusito/rsync-ssh