Skip to content

Instantly share code, notes, and snippets.

@richo
Last active October 11, 2015 12:58
Show Gist options
  • Save richo/3862578 to your computer and use it in GitHub Desktop.
Save richo/3862578 to your computer and use it in GitHub Desktop.
#!/bin/sh
set -x
sudo mkdir ~/.ssh
sudo chown -R `whoami` ~/.ssh
chmod 700 ~/.ssh
if [ ! -f .ssh/id_rsa ]; then
ssh-keygen -b 4096 -N "" -f ~/.ssh/id_rsa
fi
echo "Fetching github public key fingerprint"
ssh-keyscan github.com >> ~/.ssh/known_hosts
ssh-keyscan dbproxy.99cluster.com >> ~/.ssh/known_hosts
echo "SSH Public key"
cat ~/.ssh/id_rsa.pub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment