SSH Tunnel

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
tcflam
Posts: 62
Joined: Tue 01 Jan 2013 10:48

SSH Tunnel

Post by tcflam » Thu 06 Mar 2014 13:01

Hi, I can't find any SSH properties in UniDAC. Our MySQL connection is using SSH tunnel. So how can I config "UniConnection"?

Thanks!

tcflam
Posts: 62
Joined: Tue 01 Jan 2013 10:48

Re: SSH Tunnel

Post by tcflam » Thu 06 Mar 2014 13:07

I'm using UniDAC 5.2.5

tcflam
Posts: 62
Joined: Tue 01 Jan 2013 10:48

Re: SSH Tunnel

Post by tcflam » Thu 06 Mar 2014 14:10

Hi, I checked that can using your product "SecureBridge" for build up SSH connection. Any example can download for how to build MySQL connection by "SecureBridge".

Thanks!

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: SSH Tunnel

Post by AlexP » Thu 06 Mar 2014 14:13

Hello,

If you are working via SSH, you should use SecureBridge in a bundle with UniDAC
You can see an example of UniDAC and SecureBridge co-working in the demo projects: ..\Devart\UniDAC for ..\Demos\TechnologySpecific\SecureBridge\

tcflam
Posts: 62
Joined: Tue 01 Jan 2013 10:48

Re: SSH Tunnel

Post by tcflam » Thu 06 Mar 2014 14:48

Hi AlexP, I found the path. But I got the error when open the demo file. It prompts "Error creating form: ancestor for 'TDemoFrame' not found". How can I solve it?

Thanks!

tcflam
Posts: 62
Joined: Tue 01 Jan 2013 10:48

Re: SSH Tunnel

Post by tcflam » Thu 06 Mar 2014 14:52

Hi AlexP, I found out how to open it. I will study the demo.

Thanks!

tcflam
Posts: 62
Joined: Tue 01 Jan 2013 10:48

Re: SSH Tunnel

Post by tcflam » Thu 13 Mar 2014 05:11

I can connected MySQL through SSH before. But suddenly, I got the error message "Socket error on binding. WSAGetLastError return 10013($271D)". Why? How can I solve this problem. I'm using UNIDAC 5.2.5

Thanks!

tcflam
Posts: 62
Joined: Tue 01 Jan 2013 10:48

Re: SSH Tunnel

Post by tcflam » Thu 13 Mar 2014 05:16

Sorry, I found what is the problem. The problem is that I installed local MySQL in my laptop. When I connect to 127.0.0.1, it will connect the local MySQL directly. Please ignore my previous issue.

But I have the other question. How to ignore saving the ?????.key file? Can it keeping in memory only?

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Re: SSH Tunnel

Post by Dimon » Thu 13 Mar 2014 13:38

You can ignore saving the SSH server key. For this, you should process the TScSSHClient.OnServerKeyValidate event and set the Accept parameter to True.
But note: it is a very insecure way and it contradicts with the principles of secure connections.

tcflam
Posts: 62
Joined: Tue 01 Jan 2013 10:48

Re: SSH Tunnel

Post by tcflam » Fri 14 Mar 2014 02:43

Hi, I will encrpt the connection string in the INI file. If I follow your instruction, it will not create the ???.key file. Right?

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Re: SSH Tunnel

Post by Dimon » Tue 06 May 2014 08:18

The server key file will not be saved automatically in any case. You can do it only manually in the TScSSHClient.OnServerKeyValidate event handler if you need.

Post Reply