Was building my app on Delphi 10.2 with Securebridge 8.1.2.
Change PC so now building app on Delphi 10.3 with Securebridge 9.3.1.
App runs and loads RSA key from external file and then a Third party pp will login to the Delphi app.
So the login fails with the Delphi app built with 9.3.1 but works with the older app built with 8.1.2
Any idea what might have changed between the versions? Is there some new setting in the ScSSHServer component that I need to set or has the format of the data in the RSA file change between versions or something else???????
Thanks
Tom
Upgrade from 8.1.2 to 9.3.1 and now RSA key does not work.
Re: Upgrade from 8.1.2 to 9.3.1 and now RSA key does not work.
Did some more test with a simple app with 9.3.1 that has a ScSSHServer, ScSFTPServer and ScFileStorage component and added some Users that has passwords and some with RSA keys.
I then run a third party app to login to the simple test app sshserver and it worked fine for Username/passwords but did not work for Username/Key combos.
Here is the output of the third party app on a failure.
******************
15:28:16.541 Debug Proxy: Connecting to none proxy at 127.0.0.1:22.
15:28:16.543 Debug SSH: Server is 'SSH-2.0-Devart-8.0'.
15:28:16.545 Info SSH: Negotiation started.
15:28:16.550 Debug SSH: Group exchange.
15:28:16.566 Debug SSH: Negotiating key.
15:28:16.587 Debug SSH: Received 2048-bit Diffie-Hellman prime (minimum allowed size is 1024 bits).
15:28:16.669 Debug SSH: Validating signature.
15:28:16.676 Debug SSH: Received 2048-bit RSA server key (minimum allowed size is 1024 bits).
15:28:16.692 Info SSH: Negotiation finished.
15:28:16.707 Info Info: Server: SSH-2.0-Devart-8.0
15:28:16.708 Info Info: Fingerprint (MD5): ca:aa:f6:3b:54:08:d5:69:88:d8:fd:49:e3:30:48:c3
15:28:16.721 Info Info: Fingerprint (SHA-256): np2onnR9LnbmFZ7eZRGoGfgppsuWzFj/GzC1gwJ6tt0
15:28:16.723 Info Info: Cipher info: SSH 2.0, diffie-hellman-group-exchange-sha256, rsa-sha2-256, aes256-ctr/aes256-ctr, hmac-sha2-256/hmac-sha2-256
15:28:16.753 Debug SSH: Allowed authentication methods for 'DefaultUser': password, publickey.
15:28:16.755 Debug SSH: Trying public key authentication for 'DefaultUser'.
15:28:17.774 Error SSH: Rebex.Net.SshException: A public key corresponding to the supplied private key was not accepted by the server or the user name is incorrect.
*************
If I compiled test app on the old PC running 8.1.2 then I could login in just fine with UserName/Keys combos.
I put code on the ScFileStorageCheckUserKey event but on the 9.3.1 app never saw that event fire.
So my questions:
1. Is there anyway to see in ScSSHServer when a request comes in and if it rejects it and why.
2. Is there some simple demo app that supports keys that I can use to see if that works or not. Please note the SimpleSSHServer does not seem to support keys and the SSHServerService would make my PC reboot. So like a demo/sample that I can run in the debugger and not as a service that supports keys.
3. I have a purchased license with source so if there is something easily done where I can debug into the source and figure something out just let me know.
At this point I am at loss of what to try next.
Thanks
Tom
I then run a third party app to login to the simple test app sshserver and it worked fine for Username/passwords but did not work for Username/Key combos.
Here is the output of the third party app on a failure.
******************
15:28:16.541 Debug Proxy: Connecting to none proxy at 127.0.0.1:22.
15:28:16.543 Debug SSH: Server is 'SSH-2.0-Devart-8.0'.
15:28:16.545 Info SSH: Negotiation started.
15:28:16.550 Debug SSH: Group exchange.
15:28:16.566 Debug SSH: Negotiating key.
15:28:16.587 Debug SSH: Received 2048-bit Diffie-Hellman prime (minimum allowed size is 1024 bits).
15:28:16.669 Debug SSH: Validating signature.
15:28:16.676 Debug SSH: Received 2048-bit RSA server key (minimum allowed size is 1024 bits).
15:28:16.692 Info SSH: Negotiation finished.
15:28:16.707 Info Info: Server: SSH-2.0-Devart-8.0
15:28:16.708 Info Info: Fingerprint (MD5): ca:aa:f6:3b:54:08:d5:69:88:d8:fd:49:e3:30:48:c3
15:28:16.721 Info Info: Fingerprint (SHA-256): np2onnR9LnbmFZ7eZRGoGfgppsuWzFj/GzC1gwJ6tt0
15:28:16.723 Info Info: Cipher info: SSH 2.0, diffie-hellman-group-exchange-sha256, rsa-sha2-256, aes256-ctr/aes256-ctr, hmac-sha2-256/hmac-sha2-256
15:28:16.753 Debug SSH: Allowed authentication methods for 'DefaultUser': password, publickey.
15:28:16.755 Debug SSH: Trying public key authentication for 'DefaultUser'.
15:28:17.774 Error SSH: Rebex.Net.SshException: A public key corresponding to the supplied private key was not accepted by the server or the user name is incorrect.
*************
If I compiled test app on the old PC running 8.1.2 then I could login in just fine with UserName/Keys combos.
I put code on the ScFileStorageCheckUserKey event but on the 9.3.1 app never saw that event fire.
So my questions:
1. Is there anyway to see in ScSSHServer when a request comes in and if it rejects it and why.
2. Is there some simple demo app that supports keys that I can use to see if that works or not. Please note the SimpleSSHServer does not seem to support keys and the SSHServerService would make my PC reboot. So like a demo/sample that I can run in the debugger and not as a service that supports keys.
3. I have a purchased license with source so if there is something easily done where I can debug into the source and figure something out just let me know.
At this point I am at loss of what to try next.
Thanks
Tom
Re: Upgrade from 8.1.2 to 9.3.1 and now RSA key does not work.
Unfortunately, we can't reproduce the issue.
Please compose and send us a complete example showing the behavior you specified and the difference in behavior between SecureBridge 9.3.1 and SecureBridge 8.1.2, including all the required files and send it to us through the contact form https://devart.com/company/contactform.html
Please compose and send us a complete example showing the behavior you specified and the difference in behavior between SecureBridge 9.3.1 and SecureBridge 8.1.2, including all the required files and send it to us through the contact form https://devart.com/company/contactform.html
Re: Upgrade from 8.1.2 to 9.3.1 and now RSA key does not work.
I sent Viktor a test example and he provide me a fix.
Turns out the issues seems to be in how the Client and Server exchanged the keys.
I could use a Devart client or a WinSCP SFTP client and the login with a key worked fine but if I used a Rebex client then the process would fail. ( I use the client Rebex .Net libraries in my other app. )
Not sure of the details but seemed to be some issue in regards to the cipher used to exchange the keys.
They said this fix would be in the next release of SecureBridge.
Turns out the issues seems to be in how the Client and Server exchanged the keys.
I could use a Devart client or a WinSCP SFTP client and the login with a key worked fine but if I used a Rebex client then the process would fail. ( I use the client Rebex .Net libraries in my other app. )
Not sure of the details but seemed to be some issue in regards to the cipher used to exchange the keys.
They said this fix would be in the next release of SecureBridge.
Re: Upgrade from 8.1.2 to 9.3.1 and now RSA key does not work.
Thank you for your interest in our product and for your contribution to its development.
We have reproduced and fixed the issue. This fix will be included in the next build of SecureBridge.
If you have any questions about our products, don't hesitate to contact us - we will do our best to help you.
We have reproduced and fixed the issue. This fix will be included in the next build of SecureBridge.
If you have any questions about our products, don't hesitate to contact us - we will do our best to help you.