I have an example of a public key (I do not have the matching private key):
AAAAB3NzaC1kc3MAAACAc/gsM3sPH0chLFpssmf28dORdPXkTNQy7ldi2A9QfQ5YA/k2Zufz9ZNY2x027sLkZi3rGpWBepwDXGz1RCVMJgwAa03Td3OuIAOq3rRkZ5TBYaXszYWFA6sQDOtErx7FRagCuODCPTVxqVqW9gA7qgy3XLK3eea8AxQdqCCwJ8EAAAAVAL4B9vIjLonmr+KcBqzj/KG0f4YFAAAAgDbeKXC+Lgb6iBX6mY8TG+kQbrbbiiJ7QD0Bi7PBorDpSsa7IDLOB0P4OhXK6sjY8rQkzdD7GRIwztwe+jkXtFJ+3hp650p/ITUZmLTWwHt+zobiyXIXmwZHF+GacaQKq5LDEafzOoMqA1RSuPlyHa/eUlaCCArw3v0OPTpPew0NAAAAgDW+aRNC8yciGm9N02jyumuiuBKaprVkRuaF/XbEKdnATRurNLAa9b/hmvgF9KjDbxnieqs3grhxLDP8lorrmhEa+EnblJVrKrUphOpFD8w/8Vm4YlZBhk0m/1wHw3S5K7KsFaEL91guq+B7b0hug7SjPk33YgKPHP0njxyYY5lK
Although it looks like OpenSSH format, it is missing the first part which says what type of key it is (e.g. ssh-dss, ssh-rsa etc).
Thanks, but I can't read the file with that command. I get either:
buffer_get_ret: trying to get more bytes 4 than in buffer 0
buffer_get_string_ret: cannot extract length
key_from_blob: can't read key type
decode blob failed.
or
input line too long.
woolmilkporc
I can read your key (just copy-and-paste via PuTTY) without any issue and get this:
I tried with OpenSSH_5.8p1 and OpenSSH_6.0p1. Both work.
clariso
ASKER
I've just tried the one I posted at the top, and it works for me too (using OpenSSH_6.2p2). Others that I'm trying give the errors, such as:
AAAAB3NzaC1kc3MAAAEBAO43lLvmKBQ9ZUVoPWCd/QNthmyNQyzWut7enDPuaX1Q5ouoGx8zPrMDqh9uoZSaRY51H6Vmwuur/idrvV69Gj2JvbSG6KCkVdt8XBKVDugaEBa8qGJdYrhWK4Yaxrw7meYc9JMIUOx97AxY7cIVWFATjWILB2f29Rh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Iiwn+gg8OiC0y8PsQUm5zfABHYST68MzOypdSZ87za+8voTpSEIRGHlzE9dEFwSkrZ6+AHil/ZcjjT/A0r5KQ9LIgkR10Q1ShBie7vGPlg8bUQD6ZHO3t0xYVwVRfNTWPUCnR/ExHaxoqFCuJ+kv+Am2HTuWNPEJiczcqrcdhlfBgg44eM+fH8ZvlbOehleYR37wclBSPDurrj4PBZX239HUsNx5w==
(gives the buffer error)
I cannot convert them either. Those files might be corrupted or incomplete.
Both seem to contain (part of?) RFC4716 converted OpenSSH keys.
I tried the other key formats nonetheless, but they don't work (as expected).
Can you get new versions of the keys (perhaps by retransmitting them from where they originally came from)?
Besides that, I fear it will not be possible to repair those files, at least I don't know how it could be done.
clariso
ASKER
The strange thing is that they still work in our old SFTP software (CoreFTP), but our new software (Cerberus FTP) requires them to be proper OpenSSH keys (hence me needing to add the first bit on).
Therefore I don't believe they are corrupt.
Anybody else got any ideas?
clariso
ASKER
I think that for the ones which don't work, it was an issue with how they were transferred to my *nix box (which has the ssh-keygen application).
I'm all sorted now.
buffer_get_ret: trying to get more bytes 4 than in buffer 0
buffer_get_string_ret: cannot extract length
key_from_blob: can't read key type
decode blob failed.
or
input line too long.