Skip to content

Instantly share code, notes, and snippets.

View hectormatos2011's full-sized avatar

Hector Matos hectormatos2011

View GitHub Profile
@hectormatos2011
hectormatos2011 / setup-github-key.sh
Last active August 2, 2017 01:07 — forked from treelzebub/setup-github-key.sh
Generate new public key (or use existing) and copy to clipboard, to paste into GitHub
#!/bin/bash
# This is a simple script that sets up a public SSH key and copies it to the
# clipboard, so you can paste it into your GitHub account here:
# https://github.com/settings/keys
#
# It only handles the default public key name, id_rsa. Deal with it :D
# Check for existing public key
keys=`find ~/.ssh -type f -name 'id_rsa.pub'`