Shell script `default/host-keys'

Install host keys (e.g. github.com, bitbucket.org, etc) into .ssh/known_hosts
Must set variable CLM_SSH_HOST to host name like this
CLM_SSH_HOST=github.com

if [ -n "$CLM_SSH_HOST" ]; then touch $HOME/.ssh/known_hosts ssh-keygen -R $CLM_SSH_HOST ssh-keyscan -H $CLM_SSH_HOST >> $HOME/.ssh/known_hosts CLM_SSH_HOST_IPS=$(dig +search +short $CLM_SSH_HOST A $CLM_SSH_HOST AAAA) for CLM_SSH_HOST_IP in $CLM_SSH_HOST_IPS; do ssh-keygen -R $CLM_SSH_HOST_IP ssh-keyscan -H $CLM_SSH_HOST_IP >> $HOME/.ssh/known_hosts done unset CLM_SSH_HOST unset CLM_SSH_HOST_IPS else echo 'Please add CLM_SSH_HOST=some-host-name.com before running this command.' fi