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.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
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.)
You can. I share the same private key across several laptops. All you have to do is copy the
~/.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.