0

When generating key pair with gitbash ssh-keygen, public key file content looks like

ssh-rsa AAA...== myemail@exmaple.com

which is successfully imported to git ssh keys, but private key can't be used with pageant.

When generating key pair with PuTTYgen, public key file content looks like

---- BEGIN SSH2 PUBLIC KEY ----
Comment: "rsa-key-20171213"
AA...==
---- END SSH2 PUBLIC KEY ----

which can't be imported to git ssh key, because of expected format, but private key can be used with pageant.

Is there a way of generating keypair with either tool (ssh-keygen or PuTTYgen) to work on both ends (git and pageant) from the get go, without altering file content?

Terafor
  • 1,550
  • 16
  • 26

2 Answers2

1

Actually PuTTYgen does provide OpenSSH format when keys are generated

enter image description here

However saving public key does the other thing. So whenever OpenSSH format is needed, private key can be loaded in PuTTYgen and copied from there.

Terafor
  • 1,550
  • 16
  • 26
0

ssh-keygen generates keys in OpenSSH format. Putty generates keys in Putty private key (ppk) format. This question should be useful for you.

PuttyGen is capable of converting ppk to OpenSSH format and vica versa, but only the private one.

Edit: see comments