2

I have git working on a Linux host with a set of keys in the .ssh folder. id_rsa and id_rsa.pub

I want to use those same keys from the Linux host in my virtual windows 8.1 machine. How / where do I need to copy/edit /massage those Linux keys so that Tortoise git can use them?

I only ever see puttygen being advertised and described as the way to generate keys but what if other keys need to be used?

Any help, greatly appreciated.

phd
  • 57,284
  • 10
  • 68
  • 103
berntd
  • 41
  • 5

1 Answers1

1

First, you would need to copy your public/private ~/.ssh/id_rsa.pub/id_rsa keys into %USERPROFILE\.ssh.
Note that copying a private key is not the best practice though: generating a new pair of keys, and registering a new public key would be best.

Then you need to configure TortoiseGit to look for openssh keys, and not putty keys: see here in TortoiseGit -> Settings -> Network.

Since TortoiseGit is configured by default for using putty, the OP berntd chose the other route (see comments):

I imported the id_rsa key into puTTYgen under convert.
I then saved it in the .ppk format.
I then told Tortoisegit to use putty key by ticking the box in the clone window.
It worked!

VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283
  • Thanks. I do not understand the second part where you say I need to configure TortoiseGit to look for openssh keys. I see the box but under network but it has: C:\Program Files\TortoiseGit\bin\TortoiseGitPlink.exe in it and there is no ssh.exe anywhere in the bin directory. (how do I get a newline in this editor? pressing enter posts the comment) – berntd Jan 17 '18 at 03:03
  • @berntd the Git in this image is a bit old: you will find ssh.exe in your Git installation folder, under `usr\bin\` subfolder. – VonC Jan 17 '18 at 07:27
  • @berntd And yes, I requested newlines in comments 8+ years ago (https://meta.stackexchange.com/q/197/6309)... I wouldn't hold my breath though. – VonC Jan 17 '18 at 07:28
  • Thanks. I found that now. While waiting for a reply, I came up with another way to get this going. I imported the rsa_id key into puTTYgen under convert. I then saved it in the .ppk format. I then told Tortoisegit to use putty key by ticking the box in the clone window. It worked! – berntd Jan 18 '18 at 03:15
  • @berntd Great! I have included your comment in the answer for ore visibilty. – VonC Jan 18 '18 at 07:44
  • @berntd Don't forget to read https://stackoverflow.com/help/someone-answers – VonC Jan 18 '18 at 07:44