maxheld83 / rsync

In the process of being transitioned to a node.js action.
https://www.maxheld.de/rsync/
MIT License
53 stars 12 forks source link

actually store known hosts #1

Open maxheld83 opened 5 years ago

maxheld83 commented 5 years ago

the public key for a known host is currently saved, but is not actually used.

The Rsync call still needs ssh -o StrictHostKeyChecking=no, otherwise we get a host key verification error.

lgarron commented 5 years ago

I had this same problem in a similar implementation.

In our case, the home directory was /github/home/, but rsync/scp/ssh itself were using /root/.ssh/ !

So if you haven't tried it yet, I'd recommend trying -o UserKnownHostsFile= $SSH_PATH/known_hosts for the rsync SSH arg, or using SSH_PATH="/root/.ssh"