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 automation
  • no: enables mitm, serious security concerns
  • yes: 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

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -