Key is Broken - when using the correct passphrase
Key is Broken - when using the correct passphrase
Hi,
I have found a little information on this, however it has all been unanimous in that "key is broken" means the wrong password has been used. However if I open this key in puttykeygen the passphrase works, so I am a bit lost as to why I am getting this message when I am using the correct password.
I created the key using puttykeygen and I converted it to OpenSSH as other instructions detail. When I import the key I am doing the following;
procedure TForm1.ImportKey(Sender: TObject);
var
Key: TScKey;
begin
Key := TScKey.Create(ScFileStorage1.Keys);
Key.KeyName := 'key1';
Key.ImportFrom(Filename, Password);
end;
This is in XE2.
I also created a key with no passphrase and then using ImportFrom(Filename) still gives me "key is broken" so the problem is not the password (I think) but what else could it be?
Thanks.
I have found a little information on this, however it has all been unanimous in that "key is broken" means the wrong password has been used. However if I open this key in puttykeygen the passphrase works, so I am a bit lost as to why I am getting this message when I am using the correct password.
I created the key using puttykeygen and I converted it to OpenSSH as other instructions detail. When I import the key I am doing the following;
procedure TForm1.ImportKey(Sender: TObject);
var
Key: TScKey;
begin
Key := TScKey.Create(ScFileStorage1.Keys);
Key.KeyName := 'key1';
Key.ImportFrom(Filename, Password);
end;
This is in XE2.
I also created a key with no passphrase and then using ImportFrom(Filename) still gives me "key is broken" so the problem is not the password (I think) but what else could it be?
Thanks.
Re: Key is Broken - when using the correct passphrase
Please make sure that the issue is reproduced on the latest SecureBridge 8.0.1 version. If it is, please compose a small sample demonstrating the described behavior and send it using the contact form https://www.devart.com/company/contactform.html. Also, please specify the used IDE version.
Re: Key is Broken - when using the correct passphrase
Hi Viktor,
I am using Rad Studio XE2 and I installed SecureBridge 8.0.1 this morning after encountering this problem, to see if the update solved the issue, unfortunately it has not.
I will send you the sample shortly.
I am using Rad Studio XE2 and I installed SecureBridge 8.0.1 this morning after encountering this problem, to see if the update solved the issue, unfortunately it has not.
I will send you the sample shortly.
Re: Key is Broken - when using the correct passphrase
Currently, SecureBridge does not support OPENSSH keys import. We will consider a possibility of adding this functionality in one of the next SecureBridge builds.
Note, you can import original ppk keys either with a password or without it.
Note, you can import original ppk keys either with a password or without it.
Re: Key is Broken - when using the correct passphrase
Hi Viktor,
Thank you. Before trying this or posting for help I read the only other information I could find on here and DemetrionQ of Devart says this;
Thank you. Before trying this or posting for help I read the only other information I could find on here and DemetrionQ of Devart says this;
Perhaps you can correct this misinformation for future searchers?"1) The fact is that PuTTY saves keys in its own format. SecureBridge doesn't support this format. You should export the Putty key in the OpenSSH or SSH2 format to use it with SecureBridge. For that, you should load your private key in PuTTY Key Generator and export it to any available format using the Conversions menu. After that you can import your key in TScFileStorage.
2) The "Key is broken" error means that you are using an incorrect password when importing the OpenSSH key. Make sure you have specified the correct password in the Key.ImportFrom method."
Re: Key is Broken - when using the correct passphrase
1. We have added support for PUTTY format keys import in SecureBridge 7.2.3. It is still possible to import a previously exported key using the menu item Conversions-Export OpenSSH key. We will consider support for a key exported using the menu item Conversions-Export OpenSSH key (force new file format).
2. The "Key is broken" error can occur not only when entering a wrong password. Some other errors can be generated when entering an incorrect password.
2. The "Key is broken" error can occur not only when entering a wrong password. Some other errors can be generated when entering an incorrect password.
Re: Key is Broken - when using the correct passphrase
Hi Viktor,
Thank you again, just to let you know my code is now working.
Thank you again, just to let you know my code is now working.
Re: Key is Broken - when using the correct passphrase
Glad to see that the issue was resolved.
Feel free to contact us if you have any further questions about our products.
Feel free to contact us if you have any further questions about our products.