Skip to content

Instantly share code, notes, and snippets.

@carcer
Created March 29, 2011 16:07
Show Gist options
  • Save carcer/892646 to your computer and use it in GitHub Desktop.
Save carcer/892646 to your computer and use it in GitHub Desktop.
1. No existing ssh key on external machine
Create a new key on the external machine with ssh-keygen -t rsa -C email@stormid.com in the git bash. The email address doesn’t matter as the next step is to overwrite the id_rsa and id_rsa.pub files in your .ssh folder with those from your Storm machine. This should be all you need to use git over the VPN.
2. Existing ssh key on external machine that can be overwritten
In this case you should only need to carry out the second step from 1 to have access via the VPN.
3. Existing ssh key on external machine to be used side-by-side
I use git gor github under a different email address so I needed 2 keys to be used. Ssh allows you to setup mappings between a key and a domain. Copy the storm ssh key files and rename them or place them in a separate directory from your existing key files. Add a file named config in the .ssh folder with something like:
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa
Host assembla.com
HostName assembla.com
User git
IdentityFile ~/.ssh/id_rsa_assembla
You will need to change the identity file path if you have named/placed the files differently. More details can be found at http://github.com/guides/multiple-github-accounts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment