Skip to content

Instantly share code, notes, and snippets.

@iansheridan
Created September 12, 2013 22:30
Show Gist options
  • Save iansheridan/6544695 to your computer and use it in GitHub Desktop.
Save iansheridan/6544695 to your computer and use it in GitHub Desktop.
pre-populate known_hosts file for known ssh access points such as github.com
# HOST == access URI (eg. github.com)
ssh-keyscan -t rsa,dsa HOST 2>&1 | sort -u - ~/.ssh/known_hosts > ~/.ssh/tmp_hosts
cat ~/.ssh/tmp_hosts >> ~/.ssh/known_hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment