2

I'm trying to understand how to set up SSH keys for GitHub. I'm not sure exactly how to word things... So, this is a breakdown of what I've done and what I'm trying to do...

  1. I generated an SSH key on Server A, from which I'll be pushing / pulling to my GitHub repository

  2. I've added an SSH Key in my Account Settings on GitHub and copied over the contents of Server A's id_rsa.pub file

  3. I can now successfully push and pull from Server A to / from my GitHub repository

Now, I want to also setup another server (Server B) so that I can push and pull from that one as well.

My question is: Do I have to generate a new ssh key on Server B, or can I "re-use" the one I've already setup? Meaning, do I have to have a completely unique ssh key on each server I'll be pushing and pulling from? If not, how can I add the id_rsa.pub file so that it's the same information? Is it just as simple as copying the files?

user1154488
  • 157
  • 4
  • 12
  • Possible duplicate: http://stackoverflow.com/questions/10054893/should-i-generate-new-ssh-key-pair-for-every-workstation-or-reuse-a-single-one – Todd A. Jacobs Jul 23 '12 at 03:09

1 Answers1

2

Its possible to use the same key but its not advised. If someone takes control of Server B you would have to regenerate a new key for A and disable access for old command. Its just not secure enough.

You should generate a new key for all machines you own. So you can individually control access for servers.

Learath2
  • 20,023
  • 2
  • 20
  • 30
  • Thank you... CodeGnome was right... It's already been asked and answered, but hard to find if you don't really know what to search for! Thanks all... – user1154488 Jul 24 '12 at 20:27