Setting up channel for postgres ?

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
kevinoleniczak
Posts: 2
Joined: Wed 22 Feb 2012 17:52

Setting up channel for postgres ?

Post by kevinoleniczak » Wed 22 Feb 2012 18:06

First attempt to tunnel my pgSQL data through the ScSSHChannel1 component. I have the connection up and am trying to tunnel port 5432 to the server. I'm getting an error...

Only one usage or each socket address is normally permitted.

Any idea what i'm missing in properties setup?

Is there a good demo project using this control? I didn't see one with this control.
thanks

kevinoleniczak
Posts: 2
Joined: Wed 22 Feb 2012 17:52

Post by kevinoleniczak » Wed 22 Feb 2012 21:52

a little more detail...

i've tested the feasibility/connectivity of what i'm trying to do by setting up a temporary ssh tunnel using putty to my server. When i do this and forward postgres port 5432, i change the database host to 127.0.0.1 and it works.

So my goal here is not use putty, but rather the secure bridge stuff. I have the ssh client connected successfully and can't get the tunnel piece to work. My settings on the Channel component are:
Client = ScSSHClient1
DestHost =
DestPort = 5432
Direct = false
GatewayPorts = false
NonBlocking = false
Remote = false
Sourceport = 5432
timeout = 1

When i do a ScSSHChannel1.connect i get no error, but when i try to open my db connection at 127.0.0.1 on port 5432... no joy... i get "wrong host name"

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

Post by AlexP » Thu 23 Feb 2012 12:27

Hello,

Yo can find an example of work with a PostgreSQL DB via SSH protocol (using SecureBridge) in the PgDAC demo samples folder.
...\Devart\PgDac for XXX\Demos\TechnologySpecific\SecureBridge\.
If you have any questions for this sample, please don't hesitate to contact us again.

Post Reply