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

Incomplete online documentation on conecting via ssh tunnels

From: "P Kapat" <kap4lin(at)gmail(dot)com>
To: pgsql-docs(at)postgresql(dot)org
Subject: Incomplete online documentation on conecting via ssh tunnels
Date: 2008-11-20 00:31:06
Message-ID: daef5be80811191631sa3290feub2cbf0dd26d01bc7@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-docs
Hi,

If this is not the correct list for the mail, I can post to a more
relevant one, suggest. Otherwise read on:

There was a discussion on connecting to a postgres server via SSH tunnels here:
http://archives.postgresql.org/pgsql-novice/2008-11/msg00060.php

The relevant documentations are (replace 8.3 by 8.2 or 8.1 or...):
http://www.postgresql.org/docs/8.3/static/ssh-tunnels.html

The concerned command is:
client$ ssh -L 3333:foo.com:5432 joe(at)foo(dot)com

From the discussion on the novice list, I came to the conclusion that
the above command works only when listen_addresses = '*' OR
listen_addresses = 'a.b.c.d'
(where a.b.c.d is the IP of foo.com; other IPs can be present too)  is
set in postgresql.conf.

But in most cases, for security reason, the server is quarantined
within localhost by setting: listen_addresses = 'localhost'.

In this case, the ssh tunnel does not work. The correct command is:
client$ ssh -L 3333:localhost:5432 joe(at)foo(dot)com
OR
client$ ssh -L 3333:127.0.0.1:5432 joe(at)foo(dot)com

It is certainly not trivial to realize (ok, one should read the ssh
manpage thoroughly) that the "localhost" or "127.0.0.1" host in the
above commands is interpreted by foo.com and hence it works. It would
be extremely helpful to include this clarification on the online
documentations (links above).

Makes sense?
-- 
Regards
PK
--------------------------------------
http://counter.li.org  #402424

Responses

pgsql-docs by date

Next:From: Peter EisentrautDate: 2008-11-20 08:26:39
Subject: Re: Incomplete online documentation on conecting via ssh tunnels
Previous:From: Emanuel CALVO FRANCODate: 2008-11-18 12:02:17
Subject: Re: [DOCS] FAQ_Solaris 1.28 to spanish

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