Skip to content

Instantly share code, notes, and snippets.

View hectormatos2011's full-sized avatar

Hector Matos hectormatos2011

View GitHub Profile
@treelzebub
treelzebub / setup-github-key.sh
Last active August 21, 2022 22:39
[macOS/Debian] 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
KEY=`find ~/.ssh -type f -name 'id_rsa.pub'`