Search code examples
gitsshmsysgit

Git: How do I set up SSH keys to access my remote repository from a second computer?


I have a git repository on Unfuddle, and a Windows machine I'm using with msysgit. I set up an SSH key on that machine using ssh-keygen, which gave me some key files. I copied the contents of the public key file into my personal settings in my Unfuddle account, and that works fine.

So what do I need to do to get it working on a second machine? If I follow the same process, I'll have to put the new public key into my Unfuddle account, so presumably the old machine will stop working. Is there some way I can get my second machine to use the same key as the first machine?

Thanks, Grant


Solution

  • 1/ If this the same user, you could copy your ~/.ssh/id_rsa and id_rsa.pub to your other machine home directory.

    or:

    2/ You should be able to register another public key to your unfuddle account, allowing you to manage one private key per machine.