tags:

views:

19

answers:

1

I have a file with my DSA private key on my windows 7 computer.

How can I add this to my Macbook so I can connect to git from it? (I have my own hosting company with git on it).

I ideally want to add this to my bash_profile also if I need to keep this alive somehow...

+2  A: 

The private key that's on your Windows 7 computer should never leave that computer.

Create a new private/public key pair on your Mac, and add the public key to the server you want to connect to (i.e. your hosting company's server which has the git repository on it). If the server is a Linux server, you can just append the contents of the new public key file to ~/.ssh/authorized_keys on the server. For other kinds of servers, there will be some equivalent way to add the new public key, but I don't know what it would be - it depends on the server OS and possibly what SSH software it runs.

David Zaslavsky
i emailed to myself, but modified it. strange when connecting it is asking me for a password, isn't that the point of SSH to not ask for a pwd?
Blankman
No. The password SSH asks you for is a local password; that password never gets sent over the network. The point of SSH is to be able to encrypt the traffic as it's going over the network, and also to be able to use pubkey/privkey encryption so that a man-in-the-middle attack can't just figure out your password.
Amber
Transmitting that private key over email means that several servers, uncontrolled by you, have now seen it. You would do well to throw away that pair (removing the public key from all systems that have it) and start over.
Ether