Re: ssl tunneling in postgres 8.1
От | P Kapat |
---|---|
Тема | Re: ssl tunneling in postgres 8.1 |
Дата | |
Msg-id | daef5be80811190144o1dbe727bha521795e5b030f9c@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: ssl tunneling in postgres 8.1 ("Obe, Regina" <robe.dnd@cityofboston.gov>) |
Ответы |
Re: ssl tunneling in postgres 8.1
|
Список | pgsql-novice |
oh sweet sweet god.. finally!!! On 11/19/08, Obe, Regina <robe.dnd@cityofboston.gov> wrote: > PK, > > Sorry about that I should have elaborated on the optional in that article. > I'll update that article with this if this works for you. > > There is actually nothing magical about 5432. Its just that if you have > the ports the same on local and remote, you just need one forwarding rule. > If you are forwarding to different ports - then you need a rule to go one > way and a rule to go the other way. > > Anyrate to fix your problem - your tunneling should look something like > this > > R5432 -- > localhost:5433 > L5433 --> localhost:5432 Thank you Regina. If I ever come to Boston, I owe you a drink :)) So, let us consider the the following "official" postgresql documentations: http://www.postgresql.org/docs/8.1/static/ssh-tunnels.html (carried over to: 8.2, 8.3 and also valid for the "interactive" versions in place of "static") The suggested commands are: client$ ssh -L 3333:foo.com:5432 joe@foo.com client$ psql -h localhost -p 3333 postgres They are just INCOMPLETE, half-baked mess :( In fact, they are simply wrong! These pages state: "The name or IP address between the port numbers is the host with the database server you are going to connect to." !!!!!!! The correct commands are (at least the ones that worked in my case): client$ ssh -R 5432:localhost:3333 -L 3333:localhost:5432 joe@foo.com client$ psql -h localhost -p 3333 postgres -U joe (or whatever the DB username/Role is) Right? If so, then the documentation needs to be updated (rather, rectified), for heaven's sake! Once again, thanks a ton, Regina :) -- Regards PK -------------------------------------- http://counter.li.org #402424
В списке pgsql-novice по дате отправления: