4
KEY_NAME=jenkins@${HOST}
5
KEY_PATH=~/.ssh/${KEY_NAME}
7
rm -f ${KEY_PATH} ${KEY_PATH}.pub
9
# Generate a password-less ssh key. The public part needs to be uploaded to
10
# launchpad as a new key for the lander bot account.
11
ssh-keygen -f ${KEY_PATH} -N '' -t ecdsa -C ${KEY_NAME}
12
echo "New public key is: $(cat ${KEY_PATH}.pub)"
14
if [ -z "$(grep '^Host \*.launchpad.net' ~/.ssh/config)" ] ; then
15
cat <<EOSC >> ~/.ssh/config
17
# Generated by slave/seed $(date)
19
IdentityFile ${KEY_PATH}