Re: pgAccess via ssh?

From: Oliver Fromme <olli(at)lurza(dot)secnetix(dot)de>
To: operationsengineer1(at)yahoo(dot)com
Cc: rstpierre(at)syscor(dot)com (Ron St-Pierre), 1100100(at)gmail(dot)com (Mike), pgsql-novice(at)postgresql(dot)org (pgsql-novice)
Subject: Re: pgAccess via ssh?
Date: 2004-09-06 10:26:16
Message-ID: 200409061026.i86AQGw3000439@lurza.secnetix.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

operationsengineer1(at)yahoo(dot)com wrote:
> [...]
> Example:
> First, set up the tunnel in one terminal...
> ssh -L 4001:remotehost:5432 user(at)remotehost
>
> Then, in another terminal, use psql to connect to the local port
> (4001) specified in the ssh command:
> psql -h localhost -p 4001 mydatabase

That's exactly what I explained in a previous message in
this thread.

> Assuming this works, can one then use pgaccess to to "tunnel" through
> the ssh tunnel? Is just changing the port to 4001 instead of 5432
> enough to get access to the remote db through pgaccess' login screen?

Yes, you connect to the local port (in the above example it
would be port 4001 on localhost). The ssh tunnel will then
pick it up and forward it to port 5432 on the remote host.
For the PostgreSQL server (which must have been configured
to accept TCP conections), the incoming connection will
appear as if it comes from localhost.

See my earlier message in this thread ...

Best regards
Oliver

--
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"One of the main causes of the fall of the Roman Empire was that,
lacking zero, they had no way to indicate successful termination
of their C programs."
-- Robert Firth

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Oliver Elphick 2004-09-06 11:04:00 Re: DROP TRIGGER permission
Previous Message Chris Ochs 2004-09-06 08:28:38 radius authentication

Browse pgsql-novice by date

  From Date Subject
Next Message tab view 2004-09-06 13:21:24 forcing date ordering
Previous Message operationsengineer1 2004-09-05 18:45:34 Re: pgAccess via ssh?