Re: psql tunneling thru a middle server

Поиск
Список
Период
Сортировка
От Rick Chu
Тема Re: psql tunneling thru a middle server
Дата
Msg-id 1304624199.32354.41.camel@ricardochu.fcla.edu
обсуждение исходный текст
Ответ на psql tunneling thru a middle server  (jtkells@verizon.net)
Список pgsql-general
On Thu, 2011-05-05 at 15:05 -0400, jtkells@verizon.net wrote:
> Im trying to connect my WS to a postgresql database (destination) via
> a middle server
> I.e.
> WS   ----> Middle ----> Database
>                 server          server
>               172.x.2.4       172.x.4.12
>
>
> I can create a SSH tunnel from my WS to the middle server but not sure
> how or if I can make the middle server pass connections to and from my
> ws and database.  BTW,  they run the DB on a non standard postrgres
> port.  Any help would be appreciated....
> Thanks
>

1. From your WS open two terminal(ssh) windows.

2. From Terminal#1 startup the ssh tunnel using:
ssh -L 5432:database.com:8432 you12@middle.com -p 20

3. From Terminal#2 connect to the database via the tunnel:
psql -p 5432 mydatabasename -U you12 -h localhost


RickC



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

Предыдущее
От: Rick Genter
Дата:
Сообщение: Re: Multiple table relationship constraints
Следующее
От: Bosco Rama
Дата:
Сообщение: Re: Generating fields in views with search/replace?