Fixup mr !188
Context
Changes
preload backup host's ssh key fingerprints on prod aguestuser authored 54 minutes ago
- if we don't have the keys, we get prompted the first time, which we can't automate
- previously, we worked around this by passing
StrictHostKeyChecking=no
tossh
, but this leaves us open to the (small) possibility of a MIM attack on the server's SSH key - instead, pin the backup server's pub key on prod by loading the
results of calling
ssh-keyscan -H <backup host ip>
into/root/.ssh/known_hosts
on prod (viaprovision.yml
) - and then remove the call to
StrictHostKeyChecking
inbin/backup
encrypt backups to deploy key
fix permissions on root ssh files loaded in provision.yml