Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to setup Github SSH key on second computer

Tags:

git

windows

ssh

I've got a Github account setup on one computer. I would like to also access my Github account on a second machine using the same SSH key I used for the first computer. How do I import the SSH private key into the new computers user profile?

cp ~/other_comp_github_key ~/.ssh/github

The above command did not do the job in the git bash console on Windows.

like image 686
Jason Avatar asked Jan 06 '12 03:01

Jason


People also ask

Can I use the same SSH key on two computers GitHub?

Also, since github allows multiple ssh keys to be used with same account, you can create a new keypair and add it to your account.

Can I use the same SSH key on two computers?

SSH Keys on Multiple MachinesYou can only upload and use one SSH key at a time at the SDCC. If you own multiple machines (e.g., a desktop and a laptop), then you can generate a public/private key pair on one machine, upload the public key to the LDAP server, and copy the private key to your other machines.

Can I add two SSH keys to GitHub?

For instance, you can run an Organization's GitHub account and another one for your personal projects all on the same computer. In this article, you will learn how to use multiple SSH keys for different GitHub accounts. While working with two different GitHub accounts, you must set them up using an SSH key.


1 Answers

Argh! No!

Do. Not. Share. Private. Keys.

Make a new keypair on the second computer.

like image 179
Matt Ball Avatar answered Oct 21 '22 23:10

Matt Ball