Skip to content

Instantly share code, notes, and snippets.

@wbyoung
Last active August 29, 2015 13:59
Show Gist options
  • Save wbyoung/10945106 to your computer and use it in GitHub Desktop.
Save wbyoung/10945106 to your computer and use it in GitHub Desktop.
Create and copy SSH key
RSA="${HOME}/.ssh/id_rsa"
PUB="${RSA}.pub"
if ! [ -f "${RSA}" ] && ! [ -f "${PUB}" ]; then
/usr/bin/ssh-keygen -q -t rsa -N "" -f "${RSA}"
fi
/bin/cat "${PUB}" | /usr/bin/pbcopy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment