Re: pgAccess via ssh? - Mailing list pgsql-novice

From
Subject Re: pgAccess via ssh?
Date
Msg-id 20040905184534.62338.qmail@web52403.mail.yahoo.com
Whole thread Raw
In response to Re: pgAccess via ssh?  (Oliver Fromme <olli@lurza.secnetix.de>)
Responses Re: pgAccess via ssh?
List pgsql-novice
this purports to explain how to connect via ssh (haven't tried it)...
 
SSH/OpenSSH method:
Use the -L option to ssh to create a tunnel between the client system and the remote system.  This is transparent to PostgreSQL, which will see the connection as coming from its local system.  You must account for this in your pg_hba.conf file.

Example:
First, set up the tunnel in one terminal...
ssh -L 4001:remotehost:5432 user@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
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?
 
tia...

Oliver Fromme <olli@lurza.secnetix.de> wrote:

Ron St-Pierre wrote:
> You don't need to putty into the box to use pgAdmin, you just tell
> pgAdmin the ip address, user (postgres),
> and password (unless it's trusted). This works as long as you've allowed
> access from your remote ip address
> eg in /data/pg_hba.conf you might have something like this
> host all all 24.233.244.45 255.255.255.255 trust
> this line trusts all users connecting from 24.233.244.45, so for example
> pgAdmin could gain db access.
>
> > No Cygwin necessary for this situation?
> >
> No cygwin needed.

However, in that case the DB connection will _not_ be
through ssh, so it will be unencrypted and insecure.

From Mike's initial mail I got the impression that he
wanted the connection to the PostgreSQL server to go
through ssh (which is basically a good thing, because
you get ssh's authentication and encryption features).

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.

> Can the denizens of this group enlighten me about what the
> advantages of Python are, versus Perl ?
"python" is more likely to pass unharmed through your spelling
checker than "perl".
-- An unknown poster and Fredrik Lundh

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)


Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!

pgsql-novice by date:

Previous
From: Antoine
Date:
Subject: grid and postgres
Next
From:
Date:
Subject: Finding Cygwin Packages with Older PGSQL Versions