Monday, July 6, 2015

ssh-keygen without prompts and publishing known_hosts

Self provisioning PKI infrastructure and auto registration destination known_hosts

# Generating PKI for publishing the build
ssh-keygen -q -t dsa -N '' -f /opt/jenkins/.ssh/id_dsa

# Registering the mvndev.mycompany.com target
ssh-keyscan -H destination.com,10.76.20.41 >> /opt/jenkins/.ssh/known_hosts