When rsyncing to an autoscale instance etc., the batch fails when asked that it is the first time, so countermeasures
For .ssh / config settings
StrictHostKeyChecking no
To the settings for the target host
20/01/28 postscript Rsync with user data when starting EC2 did not work When I checked "/var/log/cloud-init-output.log" and "/var/log/cloud-init.log", the following logs were found.
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [Receiver=3.1.2]
This happens because the execution user at user data startup is root, but it could be solved in the same way
Recommended Posts