SSH checks the host when connecting.
Because this image is for use in a script, there is no one to accept the host.
This script makes that all hosts are automatically accepted.
It adds the following to
Host * StrictHostKeyChecking no UserKnownHostsFile=/dev/null
Writes a private key to
The private key should be provided in the
PLUGIN_KEY environment variable.
Writes a SSH config.
It needs the
PLUGIN_CONFIG_NAME and the
PLUGIN_CONFIG_OPTIONS environment variables.
PLUGIN_CONFIG_NAME is used as the name of the host.
PLUGIN_CONFIG_OPTIONS should be a comma separated string with options for the host.
pipeline: rsync: image: pieterscheffers/docker-rsync pull: true secrets: [ plugin_key ] config_name: myhost config_options: - HostName example.org - User superman - Port 2222 commands: - skip-host-validation.sh - write-privkey.sh - add-ssh-config.sh - rsync -a myhost:/home/username/dir1 dir2