Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On my windows 7 I have both id_dsa and id_rsa keys. I've decided that I want to switch to ubuntu 12.04 LTS to be exact. can I transfer my id_dsa and id_rsa keys and other git configurations to Ubuntu? if I did that will I still have the permissions to the repositories I am currently has access to.

note that I've used msysgit to generate my id_dsa and my id_rsa keys.

share|improve this question

migrated from Jun 19 '13 at 20:02

This question came from our site for professional and enthusiast programmers.

oh okay. please move my question – user962206 Jun 19 '13 at 11:46
up vote 2 down vote accepted

Yes, it's okay to just copy them over: Git for Windows (what you called "msysgit") ships with a build of an OpenSSH client, and since Ubuntu ships OpenSSH as its SSH client as well, the keys require no conversion.

Note that both keys should be placed under the ~/.ssh directory on the Ubuntu machine (note that if this directory does not yet exist, and you're about to create it by hand, it must be owned by your primary user and group and have 0600 access mode). Then the id_rsa file — the private key — must be set to have 0600 access mode. The public key ( should use 0644 access mode — that is, write access for you only and read access for everyone.

Note that it's okay to lose as it can be regenerated from your private key at any time.

share|improve this answer
do I need the dsa key? – user962206 Jun 19 '13 at 23:29
@user962206, well, that's just another key, using a different set of algorythms for cryptography. AFAIK, as long as OpenSSH is concerned, there's no difference, but there's also no point having two keys if you only need one (if you will need another key -- for instance, many SSH guides advise to have one key per client host), you will easily generate one (just name it differently from id_rsa). See this for more info on RSA vs DSA. – kostix Jun 20 '13 at 7:36
@user962206, one aspect of this might still be not clear, so let me clarify: each key you generate for SSH is distinct, no matter what set of cryptography algorithms is used to handle it. This means each key also has distinct public part and fingerprint, and as you might have already noticed, when you make a remote system (Git hosting included) trust your particular key, you use that key's public part. Hence your existing two keys are really distinct -- they're not the same key just using different algos, they are really different. – kostix Jun 20 '13 at 7:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.