Skip to content

Instantly share code, notes, and snippets.

@multidis
Created October 5, 2013 23:29
Show Gist options
  • Save multidis/6847364 to your computer and use it in GitHub Desktop.
Save multidis/6847364 to your computer and use it in GitHub Desktop.
Organize multiple ssh private keys: save this as ~/.ssh/config
# bitbucket key
Host *.bitbucket.org
IdentityFile ~/.ssh/id_rsa.bitbuck
# hostmonsater key
Host *.hostmonster.com
IdentityFile ~/.ssh/id_rsa.hostmonst
# heroku
Host heroku.com
User git
Hostname heroku.com
IdentityFile ~/.ssh/id_rsa.heroku
IdentitiesOnly yes
# end heroku
## NOTE: needed to remove pub-file from .ssh for Heroku to work; not sure why.
## As an opposite case: with bitbucket needed to keep .pub there to work.
ssh -vvv git@heroku.com # or whatever the address is for ssh
ssh-keygen -t rsa -C "your_email@example.com"
## cp to clipboard
xclip -sel clip < file.pub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment