login about faq

Hi

I am trying to call the below

i_bSSHSuccess = key.FromPuttyPrivateKey(keystr)

it fails with message fromPuttyPrivateKey: Invalid Putty Private Key --fromPuttyPrivateKey Failed.

Chilkat version:9.5.0.54.

Thanks

asked Sep 01 at 00:43

sjoseph's gravatar image

sjoseph
31


You version is a bit behind, does the problem persist with 9.5.0.58?

If so, please post the full contents of the LastErrorText property immediately after the failing call in <pre></pre> tags.

link

answered Sep 01 at 07:15

jpbro's gravatar image

jpbro ♦
1.1k2618

Is the full error similar to the following?

ChilkatLog:
  FromPuttyPrivateKey:
    DllDate: Jun 13 2016
    ChilkatVersion: 9.5.0.58
    UnlockPrefix: <redacted>
    Architecture: Little Endian; 32-bit
    Language: ActiveX
    VerboseLogging: 0
    fromPuttyPrivateKey:
      Expecting PuTTY-User-Key-File-2
    --fromPuttyPrivateKey
    Failed.
  --FromPuttyPrivateKey
--ChilkatLog

We are also now having this error with the latest 9.5.0.58. It did not occur with the previous version we were using, which was 9.5.0.48.

link

answered Sep 09 at 09:27

RJP's gravatar image

RJP
1

Thanks. Please post a sample of a private key that is getting passed that reproduces the error.

link

answered Sep 09 at 17:25

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Here is a direct copy of the contents of the .ppk file:

PuTTY-User-Key-File-2: ssh-rsa
Encryption: none
Comment: rsa-key-20140227
Public-Lines: 6
AAAAB3NzaC1yc2EAAAABJQAAAQEAiI+pMoH+7RvFZ/hRa31u80CXIRk29+X+n74f
r4KukpqP3BfBbKd5LzGk2FTAPS86A3WxsH290jXwWEqwSzfyhmKJXpMVm1qwT2bt
6QbazOIcfvlFvjjxMrUuuNTcWlUMKvUG7s9Kp8thGJg+pdB+WWY4ViDb6y987ZpY
HIWvcCBqiTo5mq6OG/TVNAXXuOda/lg4CJ3YLIwftEWojFNzH/QtqzI6A0stfOFX
XkmdBjpvRSwRU/QAwfdH9jEAC/8pCPNt15S9Z7zSMYTpbCxVJV8ybthiuUQaovgk
kTpJs7OxYAnePDNvz584pGheHnmRN15BNj41yw27GEIgdNAAjQ==
Private-Lines: 14
AAABADOr+tTXPd0tGkMEAyHAwjKHJG1jfJUml7IQll4VxYOUbcjmZN0BGRjGrROV
sIXahKdc9yAvk+6soCFoXmGmd3EeXX27HO6ssWom8jx/IltceXwm98tvfdvV2lPG
Kdz9lea9k+uoYW/sFua2JYrZRJCHivAoG9xy1VL8IVbmebu4r4o+n6AN0ZwvsCbG
vkO4Ik1e20ZIM+taci/JN/+pUEqaQVcUmQO4riFgB1/m5u6f3/SqQWEuEeSY/ASy
tnE8np+qnptrwE2Gt+RSz9kmvw7PMM5flCtDLMAOUqmqVJ4tmvRtJ0ZZUBp4kHgi
DYfZyjnctR6JXhSVxz2F9cSe1G0AAACBAL8PjMX+k71ItEo487RKRC2zdjc4lizr
Z/3YyYyk3EJ0YbYec11IwnQTq7teHIbDHhCYXtEWjlpy0OCLA2r4pAJyXExJqMvY
0Xt1/QDE2+kRKcKlqu5PFn98oKYYzlEJVmLnBnZThcsDRrWzttwnOWsmsLsXpRbi
rgJac4xHtX5lAAAAgQC2+gfyUIiUkecU3bu+4DyJfmdPlkjY5Wv0FAzjVhMlnUPv
b79IVUU2WiWIgriPXr78gZ2Tc2vkvCRfp+eOVc06OcHsF7zjCyvecmPn6WoFbRHc
gzDaiiCk4Z9a3JeGvy3rznU29+YshmMFIOnL66Uh5XiC4C4T+x0FmzWvN7/jCQAA
AIA5symVGM1RpWPGt/d3iMcjBFveVafdYravNHsXGE6o6Va2UuSVife23B7wz0II
PesoQ3B492Kq9yFewfJ4DittlaBWyWGCfu5Rt21EmhxxBLP/BFW1rwhwQJkduSe1
HZsJV7Hxy4wbfhOnaOGuKi91mdX4+E1t9yyRRk94Ab6lPw==
Private-MAC: 08f007a5460dbdceead8f20fe5b268a5457b2ef6

link

answered Sep 13 at 08:44

RJP's gravatar image

RJP
1

I gave it a test, and everything worked for me. Double check the actual string your passing to FromPuttyPrivateKey. I suspect you're passing invalid data.. (in other words, the string you're actually passing is not what you think you're passing)..

link

answered Sep 13 at 11:43

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Did the FromPuttyPrivateKey method get changed at some point?

Because I see that the current documentation does explicitly state that the argument to FromPuttyPrivateKey should be the file contents, not the file name. And our code does appear to be passing in a file name.

I would agree this is incorrect according to current documentation (I haven't tried changing it yet), but am just very confused how our application IS working with the 9.5.0.48 version of the DLL!

link

answered Sep 13 at 11:57

RJP's gravatar image

RJP
1

I tested your PPK and found everything to be working.

Please note that the Forum is not a good way to get paid-for support. The forum is intended for user-to-user discussion.

If you are a licensed Chilkat customer with support that has not yet expired, please send email to support@chilkatsoft.com.

If your support has expired and not lapsed for more then 3 months, then a renewal is possible at https://www.chilkatsoft.com/renewals.asp.

If support has expired for a longer period of time, then a regular purchase is required.

At this time, Chilkat is busy helping licensed customers with non-expired support. As time permits, Chilkat will try to answer Forum questions.

link

answered Sep 13 at 12:00

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×3

Asked: Sep 01 at 00:43

Seen: 212 times

Last updated: Sep 13 at 12:00

powered by OSQA