Skip site navigation (1) Skip section navigation (2)

Re: ssl tunneling in postgres 8.1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "P Kapat" <kap4lin(at)gmail(dot)com>
Cc: "Obe, Regina" <robe(dot)dnd(at)cityofboston(dot)gov>, pgsql-novice(at)postgresql(dot)org
Subject: Re: ssl tunneling in postgres 8.1
Date: 2008-11-19 17:56:51
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
"P Kapat" <kap4lin(at)gmail(dot)com> writes:
> The suggested commands are:

> client$ ssh -L joe(at)foo(dot)com
> client$ psql -h localhost -p 3333 postgres

> They are just INCOMPLETE, half-baked mess :( In fact, they are simply
> wrong!

They're not wrong.  There's still something funny about your setup
if that doesn't work ... and I'm afraid Regina's suggestion of a
reverse channel is just nonsense.

> The correct commands are (at least the ones that worked in my case):

> client$ ssh -R 5432:localhost:3333 -L 3333:localhost:5432 joe(at)foo(dot)com

The -R switch is useless here.  The important point AFAICT is that you
used localhost rather than in the -L switch.  That name is being
evaluated at the remote end.  What I suppose is happening is that the
Postgres server is configured to listen to (ie, "localhost")
but not its external IP address (whatever "" resolves as).
If you don't want to change that then "localhost" is the correct thing
to be using.

			regards, tom lane

In response to


pgsql-novice by date

Next:From: Mark WimerDate: 2008-11-19 18:17:23
Subject: Re: connecting /sharing tables across databases
Previous:From: P KapatDate: 2008-11-19 09:44:48
Subject: Re: ssl tunneling in postgres 8.1

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group