Re: Connect to PostgreSQL server from an ADSL connection

Поиск
Список
Период
Сортировка
От tony
Тема Re: Connect to PostgreSQL server from an ADSL connection
Дата
Msg-id 1136145173.2833.51.camel@hush.localdomain
обсуждение исходный текст
Ответ на Re: Connect to PostgreSQL server from an ADSL connection  (Szabolcs Andrási <andrasi.szabolcs@gmail.com>)
Список pgsql-admin
Le dimanche 01 janvier 2006 à 20:05 +0100, Szabolcs Andrási a écrit :
> > ssh -v -L 5432:localhost:5432 dbuser@your.dyndns.domaine
> >
> > Then connect to your database on localhost.

> Thank you very much for your answer. Sorry to bother you again with
> the same question but unfortunately it is still not clear to me how to
> configure the PostgreSQL server. Could you please be more specific and
> detailed? Let me write an exact situation to make the answer easier:

The postgresql server must also be running SSH server. You use the SSH
client to forward the postgresql port to your local computer. Your
client computer does not need to have a domain name.

> - PostgreSQL is newly installed, so now everything is set to default values.
> - The PostgreSQL server is runing on a computer with a domain name for
> example "my.pgserver.com" and listening on port 5432.

So for you the SSH comand line would be
ssh -v -L 5432:localhost:5432 dbuser@my.pgserver.com

> - A client application is running on this remote computer. This
> application would like to connect to the PostgreSQL server on
> "my.pgserver.com" and fetch some data from a table.

You open your client and point it to localhost:5432

SSH is forwarding the distant 5432 port to your local computer through a
secure tunnel. This is totally transparent for server and client - the
server needs no configuration. You can forward the postgres port to
another port number if you wish (for example you are running a
postgresql server on your local machine too).

Cheers

Tony
--
Tony Grant
www.tgds.net - vente d'ordinateurs mini-itx en ligne
www.tgds.net/epiaix1.html - A fedora Core 4 based live CD for VIA Epia-M


В списке pgsql-admin по дате отправления:

Предыдущее
От: Szabolcs Andrási
Дата:
Сообщение: Re: Connect to PostgreSQL server from an ADSL connection
Следующее
От: John DeSoi
Дата:
Сообщение: Re: Connect to PostgreSQL server from an ADSL connection