Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have my github account and I want to access it from my two workstations, an Ubuntu workstation and a Windows one.

I'm a beginner on SSH and git as well, I followed all the instructions to setup my account with an SSH key on my ubuntu laptop, and everything works, but now if I want to use my git account from my windows laptop, I need to generate another ssh key or I can use the one generated from my ubuntu laptop?

Maybe I need to generate another ssh key from my windows laptop and then register it with my github account along with the one I generated from my ubuntu laptop and use each one from respective machine?

What is the best way to do? Is there a best practice?

If I can use the same SSH key on both, how I can import the key I already use in the other machine?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

It is best practice to use separate SSH keys on each machine, to limit the pain in the event of a compromise (you only have to rekey the compromised machine, and not all of them).

To add another public key to your Github account, login to Github and then visit https://github.com/account (or click the "Account Settings" link in your dashboard), then click "SSH Public Keys" and then "Add another public key". Give the new key a title (usually the machine's name is best) and then paste the key data itself into the large textbox. From then on, you should be able to access Github repositories over SSH from either machine.

share|improve this answer

It is acceptable to use the same private key on both machines. Note that if you're using plink on the Windows machine that you may need to convert it from the format used by OpenSSH.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.