[Qgis-user] Question about Postgis connection

Alex Mandel tech_dev at wildintellect.com
Tue Jan 4 12:22:08 PST 2011


On 01/04/2011 12:12 PM, Marcos Sobral wrote:
> Hi,
> 
> I have a dynamic IP, and I need to conect to a postgis DB usign Quantum. The
> issue is that in order to have a secure environment I cannot allow to acces
> any IP to my server. So what I have todo every time I want to connect is to
> correct my pg_hba.conf.
> 
> I think that if I could connect using a ssh tunel this would be solved, and
> I'd have a secure way to connect my DB.
> 
> Does anyone knows if Quantum alows me to connect using a ssh tunel?
> 

Sure that would work, but you will need to setup the ssh tunnel and port
forwarding oustide QGIS.

On a linux box here is an example from my .ssh/config
Host machine
Hostname machine.com
        User myuser
        Localforward  5433 localhost:5432

On windows the same can be done with PUTTY.

In QGIS the connection would be to localhost or 127.0.0.1
Port would be 5433, note I change the port so it doens't conflict if I'm
running a postgres db locally too.

Enjoy,
Alex




More information about the Qgis-user mailing list