I have a private key git file in my desktop wich I currently use and I also need to use on my laptop, my question is can I also use the same key in a different computer and if its possible how can I do it ??

I'm using tortoise git.

Cheers

link|improve this question
not a programming question. ask superuser.com – Scharron Aug 3 '10 at 13:44
feedback

migrated from stackoverflow.com Aug 4 '10 at 13:52

This question came from our site for professional and enthusiast programmers.

2 Answers

You can, but you absolutely should not ever copy private keys between computers. Once it is transmitted over a network, you cannot be sure that it is kept secure. Moreover, private keys were not designed to be used this way. A private key represents an account on a specific device, not a user in general.

The best practice is to generate a new private key for every user/machine combination you wish to use. (You can use the same passphrase in each case, if desired, because the private key will still come out differently, but for extra security you should use a different phrase. You can embed the user/machine name in the phrase to help you remember, if this becomes an issue.)

link|improve this answer
feedback

You can. I share the same private key across several laptops. All you have to do is copy the id_rsa and id_rsa.pub from ~/.ssh on the current machine to the same directory on the target machine. The latter contains the public key, but you'll probably want that available on both machines for access later. It's probably not strictly necessary to answer your question.

link|improve this answer
1  
NO! Don't do this! – Ether Aug 3 '10 at 16:03
Talk about security risk :D – sleepynate Aug 3 '10 at 17:18
Never said it was a good idea. I understand the risks, but there was a time when one of the services I used--Github or Unfuddle, I think--only allowed access from one key. That made it a necessary evil for me when I did it. Though, to this point, I haven't changed it so that's on me. – Rob Wilkerson Aug 3 '10 at 17:44
feedback

Your Answer

 
or
required, but never shown