Convert ssh key generated on mac to ppk
Asked Answered
L

1

5

I have a private ssh key which i used on mac to gain access to my company´s repository.

Currently I´m working under Windows environment and want to access these repo´s with Tortoise HG.

Unfortunaly i seem to need a .ppk, PuttyPrivateKey to let that happen.

Is there a way to convert my existing id_rsa file to a ppk file?

Or alternatively can i use my existing ssh key file under windows environment to access a hg repo?

Thanks in advance!

Lully answered 12/9, 2012 at 8:12 Comment(0)
V
9

I can't say I'm 100% familiar with this topic, however, have you tried using PuTTYgen to Import the id_rsa file?

Using the ‘Import’ command from the ‘Conversions’ menu, PuTTYgen can load SSH-2 private keys in OpenSSH's format and ssh.com's format. Once you have loaded one of these key types, you can then save it back out as a PuTTY-format key (*.PPK) so that you can use it with the PuTTY suite. The passphrase will be unchanged by this process (unless you deliberately change it). [source]

You can download PuTTYgen on the usual PuTTY download page:

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Virtues answered 12/9, 2012 at 8:41 Comment(5)
Don't feel bad man. It's certainly not something you encounter on a day to day basis, and rather strange for most people to encounter! I'm honestly a bit curious though, as to why you didn't generate a second ssh key for the new machine, and add that one as authorized to access the hg repo.Virtues
Yeah that would have been an option but i would have had to give it someone to authorize it and decided to get smarter instead.Lully
What happens now if the worst happens and your SSH key on one of the machines using it gets compromised? :) To revoke it, you're going to need to revoke all machines using it. Sure, generating and providing a secondary public key now is a bit more work up front, but should the worst come to happen, it'll be a lot easier to do damage control and repair down the road, since you won't have to revoke all of your access. Just my two cents anyhow, as I've seen it happen to someone. :\Virtues
Thanks for your advice. Havent looked at it that way until now.Lully
No worries 'mate. Good luck to you, and hopefully all goes well with the new machine setup! :)Virtues

© 2022 - 2024 — McMap. All rights reserved.