PuTTYgen unable to import openssh key - SSH

This is a discussion on PuTTYgen unable to import openssh key - SSH ; I am having an intermittent problem with openssh private keys generated by Vandyke's SecureCRT. Some of openSSH private keys that I generate are opened happily by PuTTYgen for conversion to the PPK format. but about half or maybe a little ...

+ Reply to Thread
Results 1 to 11 of 11

Thread: PuTTYgen unable to import openssh key

  1. PuTTYgen unable to import openssh key

    I am having an intermittent problem with openssh private keys
    generated by Vandyke's SecureCRT. Some of openSSH private keys that I
    generate are opened happily by PuTTYgen for conversion to the PPK
    format. but about half or maybe a little less PuTTYgen throws the
    error: Couldn't load private key (unable to create key data
    structure). ssh-keygen is able to manipulate the key without errors
    by that I mean changing the passphrase. I need to find a way to
    convert these private keys to putty format as installing a new public
    key on the remote machines is not an option at this time. Any help of
    suggestions would be greatly appreciated.

  2. Re: PuTTYgen unable to import openssh key

    swjpilot@gmail.com wrote:
    > I am having an intermittent problem with openssh private keys
    > generated by Vandyke's SecureCRT. Some of openSSH private keys that I
    > generate are opened happily by PuTTYgen for conversion to the PPK
    > format. but about half or maybe a little less PuTTYgen throws the
    > error: Couldn't load private key (unable to create key data
    > structure). ssh-keygen is able to manipulate the key without errors
    > by that I mean changing the passphrase. I need to find a way to
    > convert these private keys to putty format as installing a new public
    > key on the remote machines is not an option at this time. Any help of
    > suggestions would be greatly appreciated.


    What version of putty?

  3. Re: PuTTYgen unable to import openssh key

    wrote:
    > I am having an intermittent problem with openssh private keys
    > generated by Vandyke's SecureCRT. Some of openSSH private keys that I
    > generate are opened happily by PuTTYgen for conversion to the PPK
    > format. but about half or maybe a little less PuTTYgen throws the
    > error: Couldn't load private key (unable to create key data
    > structure).


    Can you provide a key file which fails, together with its
    passphrase?

    (I don't mean one that you're actually using, of course. Generate
    fresh ones until one fails. If half of them go wrong, that shouldn't
    be hard.)
    --
    Simon Tatham "The voices in my head are trying to ignore me.
    But if I keep talking, I can drive them insane."

  4. Re: PuTTYgen unable to import openssh key

    On Oct 6, 5:53*pm, Simon Tatham wrote:
    > wrote:
    > > I am having an intermittent problem with openssh private keys
    > > generated by Vandyke's SecureCRT. *Some of openSSH private keys that I
    > > generate are opened happily by PuTTYgen for conversion to the PPK
    > > format. *but about half or maybe a little less PuTTYgen throws the
    > > error: Couldn't load private key (unable to create key data
    > > structure).

    >
    > Can you provide a key file which fails, together with its
    > passphrase?
    >
    > (I don't mean one that you're actually using, of course. Generate
    > fresh ones until one fails. If half of them go wrong, that shouldn't
    > be hard.)
    > --
    > Simon Tatham * * * * "The voices in my head are trying to ignore me.
    > * *But if I keep talking, I can drive them insane."


    I have tried this with both the production release of putty .60 i
    believe and the latest dev build that i downloaded today. I am
    pasting one of the non production keys below.
    Thanks

    -----BEGIN RSA PRIVATE KEY-----
    MIICXgIBAAKBgQCr7qdtEjZ/tj+NG4W0CDEeuiqbIVRx4x04pbzX8mLDNkYyo2Ut
    Ict3sXWnTE7cd+bfaaLeSbGPsSpWArPAqlL9SWcGOWq6SO9EM7 L9ePvA1AIkpF1T
    qrvbCuVwPzyv6dLQ/Fg5EoMBhcx8PBbBjVFLpduRIVrHh/BzwJ5rmzCO9wIDAQAB
    AoGBAJ12G6Yb2QfL7JYaD7CbFAl1LJIYy1LmUpvPxozrsyHfsh isZnwYCFVdlEgc
    7diigzI3d+8nBNR5yDEvllqsYwWPSxSgnkJysEk12ewmhFPn/Vg4RyCRfCaJMQdu
    D36mLvJToJj8jP/Nnud3QlnIYs+eiAGw2xJxm19Y27C769JRAkEAykglOr74QGXP
    D8w8ihYZwetQKoFmBVvUbKgj2GHKuAGJ1w35AeyemVHgI5EEd/Qi4awiT7fMTJQX
    zUPQr3VOLwJBANmXO+Df+ecwTZa03SiCTm9KapclhTB0gLucfX 5ZE9KmgBQ6y384
    y1DEaOD+scpXWrSv7t9vfJVK8dYbgx5ZIbkCQGUzewzNBj6RsO pib9dV/0T5iX36
    hyQfMUO7S1OyeU1d16x0HSRNUXu7brvcjbPFvL3S9MeVWOznGp FjYECoG5kCQQDP
    XxW/FFa8IcngVpDruXx9DkQVtrl/25iQtOzZDJYazXoFTZ+BqSQD3pxByhqxR513
    1LBom3z1X46pymCk/LdpAkEAyZGI84NhLa0fQ6LjXVL2dIhDB3a7KuOMGMfzPhF4
    CQhAEqdAfgRDy0+zoISiMRvVceK2pbRPUf4rcwplCj8ayA==
    -----END RSA PRIVATE KEY-----

  5. Re: PuTTYgen unable to import openssh key

    On Oct 6, 5:53*pm, Simon Tatham wrote:
    > wrote:
    > > I am having an intermittent problem with openssh private keys
    > > generated by Vandyke's SecureCRT. *Some of openSSH private keys that I
    > > generate are opened happily by PuTTYgen for conversion to the PPK
    > > format. *but about half or maybe a little less PuTTYgen throws the
    > > error: Couldn't load private key (unable to create key data
    > > structure).

    >
    > Can you provide a key file which fails, together with its
    > passphrase?
    >
    > (I don't mean one that you're actually using, of course. Generate
    > fresh ones until one fails. If half of them go wrong, that shouldn't
    > be hard.)
    > --
    > Simon Tatham * * * * "The voices in my head are trying to ignore me.
    > * *But if I keep talking, I can drive them insane."


    Sorry forgot to say that there is no paraphrase on that key...

  6. Re: PuTTYgen unable to import openssh key

    wrote:
    > I have tried this with both the production release of putty .60 i
    > believe and the latest dev build that i downloaded today. I am
    > pasting one of the non production keys below.


    Thanks, that's very helpful.

    One of the things in a private key file of this type is a pair of
    primes. OpenSSH consistently stores them with the larger one first,
    and PuTTY expects that. The file you posted here has the smaller one
    first, which PuTTY wasn't prepared for. I have to assume that
    SecureCRT is simply writing out the primes in whatever order it
    happens to randomly generate them, so that (just as you said) about
    half the time the smaller prime comes first.

    So arguably this is a problem in SecureCRT's export function.
    However, it's easy and clearly useful for PuTTY to be able to cope
    with the result, so I've done that. The development snapshot of
    PuTTYgen on the web as of now has been fixed to cope with the primes
    in either order and regenerate the auxiliary data when necessary.

    So if you download the current PuTTYgen snapshot, you should find
    the problem has gone away. Furthermore, if you use the current
    snapshot to import one of those key files and immediately export it
    again in the same format, you should find that the result has the
    primes in the normal order and that older versions of PuTTYgen can
    cope with it as well (in case that's useful).
    --
    Simon Tatham "_shin_, n. An ingenious device for
    finding tables and chairs in the dark."

  7. Re: PuTTYgen unable to import openssh key

    Simon Tatham wrote:
    > wrote:
    >> I have tried this with both the production release of putty .60 i
    >> believe and the latest dev build that i downloaded today. I am
    >> pasting one of the non production keys below.

    >
    > Thanks, that's very helpful.
    >
    > One of the things in a private key file of this type is a pair of
    > primes. OpenSSH consistently stores them with the larger one first,
    > and PuTTY expects that. The file you posted here has the smaller one
    > first, which PuTTY wasn't prepared for. I have to assume that
    > SecureCRT is simply writing out the primes in whatever order it
    > happens to randomly generate them, so that (just as you said) about
    > half the time the smaller prime comes first.
    >
    > So arguably this is a problem in SecureCRT's export function.
    > However, it's easy and clearly useful for PuTTY to be able to cope
    > with the result, so I've done that. The development snapshot of
    > PuTTYgen on the web as of now has been fixed to cope with the primes
    > in either order and regenerate the auxiliary data when necessary.
    >
    > So if you download the current PuTTYgen snapshot, you should find
    > the problem has gone away. Furthermore, if you use the current
    > snapshot to import one of those key files and immediately export it
    > again in the same format, you should find that the result has the
    > primes in the normal order and that older versions of PuTTYgen can
    > cope with it as well (in case that's useful).


    Simon, has anyone mentioned lately how cool you are and how much we appreciate
    your work? And speaking of latest snapshots, do you have the Kerberos support
    in there?

  8. Re: PuTTYgen unable to import openssh key

    Nico Kadel-Garcia wrote:
    > Simon, has anyone mentioned lately how cool you are and how much we
    > appreciate your work?


    Thank you :-)

    > And speaking of latest snapshots, do you have the Kerberos support
    > in there?


    Should be, yes.
    --
    Simon Tatham "Selfless? I'm so selfless I
    don't even know who I am."

  9. Re: PuTTYgen unable to import openssh key

    Simon Tatham wrote:
    > Nico Kadel-Garcia wrote:
    >> Simon, has anyone mentioned lately how cool you are and how much we
    >> appreciate your work?

    >
    > Thank you :-)
    >
    >> And speaking of latest snapshots, do you have the Kerberos support
    >> in there?

    >
    > Should be, yes.


    Unfortunately, it crashes immediately, so it's rather hard to test.

  10. Re: PuTTYgen unable to import openssh key

    Nico Kadel-Garcia wrote:
    > Unfortunately, it crashes immediately, so it's rather hard to test.


    Oops, yes. Probably would have been a good idea if I'd minimally
    checked whether yesterday's PuTTYgen fix broke anything else...

    Tomorrow's snapshot should be better again.
    --
    Simon Tatham "Every person has a thinking part that wonders what
    the part that isn't thinking isn't thinking about."

  11. Re: PuTTYgen unable to import openssh key

    On Oct 8, 2:10*pm, Simon Tatham wrote:
    > Nico Kadel-Garcia * wrote:
    >
    > > Unfortunately, it crashes immediately, so it's rather hard to test.

    >
    > Oops, yes. Probably would have been a good idea if I'd minimally
    > checked whether yesterday's PuTTYgen fix broke anything else...
    >
    > Tomorrow's snapshot should be better again.
    > --
    > Simon Tatham * * * * "Every person has a thinking part that wonders what
    > * *the part that isn't thinking isn't thinking about."


    That worked perfectly. Thank you for your help!

+ Reply to Thread