How to reuse and share a private key SSH between Mac OS X and Linux?

1

I've noticed that Mackup is able to back up the private key in Dropbox. I tried copying my old private key from a Time Machine backup (I did a Mavericks clean install), which was password-free for my home.

When I try to use the key in OS X it prompts me for a password as if my key had one, and will not let me use it. I have not yet tested what happens on Linux.

Use OS X 10.9.1 and Elementary OS Luna.

    
asked by anonymous 09.02.2014 / 19:57

2 answers

1

As J Bruni said, it's a matter of copying the key to the other computer that wants to use it.

For the problem you mentioned about copying the key to another Mac and asking for a password, I recommend that you create a private key manually, as described in link and do not manually add a password at the time it asks for a password. If that does not work, create the private key on a Linux or Windows with Cywin and copy the generated key to all the computers.

My only concern when using Dropbox to remain with private key sharing is that it can be compromised. Remember that private key is something serious. It can be used to login without a password, which means that if it is exposed, it can cause a lot of damage. Since it is not something that changes frequently, it is better to have it in each location.

    
10.02.2014 / 01:43
0

Copying the private key in Dropbox makes it easy to copy to any other system where you want to use it.

On Linux, create the ~/.ssh directory, if it does not exist, and copy the private key file to it with the name id_rsa . Restrict access to it with chmod 600 ~/.ssh/id_rsa

    
09.02.2014 / 22:20