git - How to prevent CI automation failures due to missing ssh key fingerprints? -
it known adding -o stricthostkeychecking=no ssh opens big mitm security hole. still when doing automation want avoid breaking build because not running on interactive mode.
it seems stricthostkeychecking has 3 modes, none of them being able cover case want auto-accept unknown keys if no conflicts.
ask: doesn't work automationno: enables mitm, serious security concernsyes: not work if fingerprint not known
so, how can make work in automation, auto-learning new keys failing if not match existing ones?
so, how can make work in automation, auto-learning new keys failing if not match existing ones?
this effective no option, when first public key man-in-the-middle.
you should initial key on different secure channel , store in ~/.ssh/known_hosts. 1 possibility use ssh certificates , trust certificate authority, not single keys.
the other possibility, if don't mind initial key setup, use ssh-keyscan, fetch keys server , store them in known_hosts:
ssh-keyscan host >> ~/.ssh/known_hosts then using stricthostkeychecking yes need.
Comments
Post a Comment