Skip to content

Instantly share code, notes, and snippets.

@datapolitan
Created August 22, 2015 05:01
Show Gist options
  • Save datapolitan/1b4d306de12c2ab88e84 to your computer and use it in GitHub Desktop.
Save datapolitan/1b4d306de12c2ab88e84 to your computer and use it in GitHub Desktop.
Multiple keys for Github account
#create an ssh key for the second account
ssh-keygen -t rsa -C "your_email@youremail.com"
#when prompted, make sure you name the file something other than the default
#"Enter file in which to save the key (/Users/you/.ssh/id_rsa): /Users/you/.ssh/id_rsa2"
#add the second key to the ssh agent
ssh-add ~/.ssh/id_rsa2
#copy public key to the clipboard
pbcopy < ~/.ssh/id_rsa.pub
#add the second key to your Github account
#follow steps here: https://help.github.com/articles/generating-ssh-keys/#step-4-add-your-ssh-key-to-your-account
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment