** updated to latest version and have issues with ssh/sftp server code. **

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
tcaduto12068
Posts: 132
Joined: Wed 17 Aug 2016 05:57

** updated to latest version and have issues with ssh/sftp server code. **

Post by tcaduto12068 » Wed 08 Mar 2017 22:52

Hi,
I just updated my custom manged SFTP server that was built with a slightly older version of sbridge and it compiles and runs fine, but when I connect with filezilla it's not checking the users password in the tscfilestoreage checkuserpass.

I put a breakpoint in that method and it never even hits it. I am using sqlite database auth and don't have any users assigned in the tscfilestorage component.

Is there any gotchas when updating I should know about?

This is on Lazarus 1.6.4 the older version I used before the latest worked fine on Laz 1.6.4 (I have source edition)

Client Log

Code: Select all

Response:	fzSftp started, protocol_version=8
Command:	open "testuser@localhost" 10022
Command:	Pass: ********
Error:	Authentication failed.
Error:	Critical error: Could not connect to server
Server console messages:

Code: Select all

SFTP (SSH) Module Active listening on port 10022
03/08/2017 04:58:04 PM:[Error] SSH Client ERROR for user::Authentication failed
03/08/2017 04:58:10 PM:[Error] SSH Client ERROR for user::Authentication failed

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: ** updated to latest version and have issues with ssh/sftp server code. **

Post by ViktorV » Thu 09 Mar 2017 11:28

Unfortunately, we could not reproduce the issue on the latest SecureBridge Professional with source code Edition 7.3.4 version на Lazarus 1.6.4. We got the specified error only in the correct situations: when entering a wrong password or setting Accept to False in the event handler CheckUserPass.
Please make sure that the issue is reproduced on SecureBridge Professional with source code Edition 7.3.4 version and check whether the problem is reproduced on our SimpleSSHServer demo project. You can find the SimpleSSHServer project in the %SecureBridgeDemos%\SFTPClient directory. %SecureBridgeDemos% is the SecureBridge Demo projects installation path on your computer.
If the issue is not reproduced on our SimpleSSHServer demo project, please bring you code into accordance with the code used in our SimpleSSHServer project. Otherwise, please compose a full sample demonstrating the specified behavior and send it using the contact form https://www.devart.com/company/contactform.html in order for us to provide you a more detailed answer.

tcaduto12068
Posts: 132
Joined: Wed 17 Aug 2016 05:57

Re: ** updated to latest version and have issues with ssh/sftp server code. **

Post by tcaduto12068 » Thu 09 Mar 2017 16:19

I looked at the delphi examples and everything looks fine.
Just a FYI, could you guys make a server demo with Lazarus as well? I don't have Delphi anymore so sometimes it's a pain to look at the delphi demos.

Anyways, I did delete the compiled libs from the old version, is there some other locations where there may be compiled libs?

It's extremely odd, the check password event never fires, I even added a user into the file storage component and a no matter what I do it say authentication failed.

Could it be the server rsa/dsa keys need to be regenerated for this new version? I kind of don't want to do that as all my users would then have to accept the new key.

tcaduto12068
Posts: 132
Joined: Wed 17 Aug 2016 05:57

Re: ** updated to latest version and have issues with ssh/sftp server code. **

Post by tcaduto12068 » Thu 09 Mar 2017 18:11

It may be something related to fpc 3.02.
I just downgraded to the prior sbridge version I was using and am getting the same error.

I will let you know if I find out what the heck is going on.

tcaduto12068
Posts: 132
Joined: Wed 17 Aug 2016 05:57

Re: ** updated to latest version and have issues with ssh/sftp server code. **

Post by tcaduto12068 » Thu 09 Mar 2017 21:38

I had some package issues and did get it working with the older version.

The other issue with 7.3.4 is the key generation no longer works from the IDE, it just hangs forever.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: ** updated to latest version and have issues with ssh/sftp server code. **

Post by ViktorV » Mon 13 Mar 2017 13:58

As we wrote earlier, unfortunately, we could not reproduce the issue. To understand the issue cause and find a solution to fix it, we need a test sample in which the issue is stably reproduced. As soon as we receive this sample and if the cause is in our product code, we will try to fix it as soon as possible.

tcaduto12068
Posts: 132
Joined: Wed 17 Aug 2016 05:57

Re: ** updated to latest version and have issues with ssh/sftp server code. **

Post by tcaduto12068 » Wed 15 Mar 2017 17:12

ok, here is how to reproduce the storage component not being able to generate a new key:

install Lazarus 1.6.4
install latest sbridge
drop a file storage component on a form.
double click storage component to open the dialog.
Key names will be blank.
click the new button, this will create a new key1 name.
select DSA 2048 and isprivate, then click the generate buttton.
New key will never generate and hour glass will spin forever.

IDE has to be killed from the task manager at this point. pretty sure this is related to why my code will never authenticate with version 7.3.4. has to be something related to the server key.

I am running on windows 7 sp1 if that matters.

tcaduto12068
Posts: 132
Joined: Wed 17 Aug 2016 05:57

Re: ** updated to latest version and have issues with ssh/sftp server code. **

Post by tcaduto12068 » Wed 15 Mar 2017 18:06

just for kicks I installed the version from Nov (7.2.3) and that version works fine.
Keys generate in the storage components and clients can connect and authenticate fine.

There is something up with the version from Jan.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: ** updated to latest version and have issues with ssh/sftp server code. **

Post by ViktorV » Thu 16 Mar 2017 14:45

tcaduto12068 wrote:ok, here is how to reproduce the storage component not being able to generate a new key:

install Lazarus 1.6.4
install latest sbridge
drop a file storage component on a form.
double click storage component to open the dialog.
Key names will be blank.
click the new button, this will create a new key1 name.
select DSA 2048 and isprivate, then click the generate buttton.
New key will never generate and hour glass will spin forever.

IDE has to be killed from the task manager at this point. pretty sure this is related to why my code will never authenticate with version 7.3.4. has to be something related to the server key.

I am running on windows 7 sp1 if that matters.
We have already fixed this issue. This fix will be included in next SecureBridge build.

tcaduto12068
Posts: 132
Joined: Wed 17 Aug 2016 05:57

Re: ** updated to latest version and have issues with ssh/sftp server code. **

Post by tcaduto12068 » Mon 03 Apr 2017 16:52

Any idea when the next build will be available?

Thanks,

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: ** updated to latest version and have issues with ssh/sftp server code. **

Post by ViktorV » Tue 04 Apr 2017 08:50

We plan to release a new build of SecureBridge that includes the fix this month.

tcaduto12068
Posts: 132
Joined: Wed 17 Aug 2016 05:57

Re: ** updated to latest version and have issues with ssh/sftp server code. **

Post by tcaduto12068 » Tue 25 Apr 2017 15:09

ok, I see the new version was just released. I will update and see if the issues with the version from jan are resolved.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: ** updated to latest version and have issues with ssh/sftp server code. **

Post by ViktorV » Thu 27 Apr 2017 10:34

Yes, you are right, the new build of SecureBridger 8.0.1 including this fix is already available for download.
When you have results on this issue, please let us know.

tcaduto12068
Posts: 132
Joined: Wed 17 Aug 2016 05:57

Re: ** updated to latest version and have issues with ssh/sftp server code. **

Post by tcaduto12068 » Wed 03 May 2017 17:39

Just wanted to let you guys know the latest released fixed all the issues I was having in this thread.
Thank you :-)

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: ** updated to latest version and have issues with ssh/sftp server code. **

Post by ViktorV » Thu 04 May 2017 10:01

Thank you for being interested in our products. We are always working on performance improvements for our products to meet our users' requirements.
If you have any questions during using our products, please don't hesitate to contact us - and we will try to help you solve them.

Post Reply