Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.


share|improve this question

migrated from Aug 4 '10 at 13:52

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

not a programming question. ask – Scharron Aug 3 '10 at 13:44

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.)

share|improve this answer

You can. I share the same private key across several laptops. All you have to do is copy the id_rsa and 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.

share|improve this answer
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

You must log in to answer this question.