Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is it safe to store ssh keys on github?

I would like to know if is it safe to store public and private key on a public git repository ? These keys are password protected.

I'm willing to do that in order to save my current linux configuration. If it's not safe to do so, do you know a way to achieve my goal ?

Regards

like image 575
Erèbe Avatar asked Aug 08 '12 09:08

Erèbe


1 Answers

Private keys should stay private. Putting them on a public git repository is very paradoxical. Even if they have a passphrase they can be forcefully opened.

Github was just hacked so you should assume that everything you upload on Github is for everybody to see, even the private repositories.

You could save your Linux config on Github, but not the private keys. They must stay private (on your server, in your home folder). Take a look at this very helpful answer at serverfault.com:

like image 123
Jonas G. Drange Avatar answered Sep 28 '22 18:09

Jonas G. Drange