Skip to content

Instantly share code, notes, and snippets.

@viglesiasce
Created August 26, 2014 21:44
Show Gist options
  • Select an option

  • Save viglesiasce/ba3e26beb4d9111145dc to your computer and use it in GitHub Desktop.

Select an option

Save viglesiasce/ba3e26beb4d9111145dc to your computer and use it in GitHub Desktop.
qa-init.sh
#!/bin/bash
#
# Script to add the git server ssh fingerprint key to the local system.
#
keyid='git.eucalyptus-systems.com,10.115.1.204 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA30Tu5JVIN9CikZh/4B0SUkgAZZh/2rVDb1hcijYmNUX85EdGRb8iwOoj3rKP7i56Hm3IB/zNRDi9biFb1mTxnmI4stGoHVRPe1M1B/D8ZEMP7XScAp0kqwWycxRnzXWqbNw5eoE8FzdmEhCuWdVVRsQea3NnCzaSHg013l1suLqCoDsHdszV8Fdj7QJ0UtpFc1KKaDg93mlTde7aop7nnJwhe3eZkw+9amhilAQl7kuWo/+f8cQ7w14ozYp9sgUJikD8m/V0pG9g81FUnwrKpJXuDmaJLBTFTSOGB+vbVQQTQciT3aplpBhl7Mx069gSEmYU4akqrO2S9s9pLKeotw=='
keyfile="$HOME/.ssh/known_hosts"
check_key=`grep -c "$keyid" $keyfile`
if [ "$check_key" -eq "0" ] ; then
echo "$keyid" >> $keyfile
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment