Re: - Mailing list pgadmin-support
From | Dave Page |
---|---|
Subject | Re: |
Date | |
Msg-id | FED2B709E3270E4B903EB0175A49BCB10473AA@dogbert.vale-housing.co.uk Whole thread Raw |
In response to | ("Peter E. Chen" <pchen3@jhmi.edu>) |
List | pgadmin-support |
Thanks for that Fred, do you mind if I use it as the basis for a howto (properly credited of course)? Regards, Dave. > -----Original Message----- > From: fred@ontosys.com [mailto:fred@ontosys.com] > Sent: 20 December 2001 17:54 > To: Dave Page > Cc: 'Peter E. Chen'; pgadmin-support@postgresql.org > Subject: Re: [pgadmin-support] > > > On Thu, Dec 20, 2001 at 04:22:41PM -0000, Dave Page wrote: > > > Can you tell me exactly how to tunnel? I'm not sure I'm > > > doing it correctly. How do I know if its working? > > > > Sorry Peter, I've never done it and don't have a clue how. Fred (if > > you're reading this :-) ), do you have a couple of minutes to give > > some pointers on this? > > Executive summary: > > + Set up a local machine (call it "mylocalhost") to forward, via > SSH, local port 35432 to remote port 5432 on the Postgres server > (call it "dbhost"). > > + Connect via pgAdmin to port 35432 on mylocalhost. > > > Details (specific to OpenSSH on mylocalhost): > > + Add the following to $HOME/.ssh/config in mylocalhost: > > Host dbhost > Hostname dbhost.com > User mynameondbhost > LocalForward 35432 dbhost.com:5432 > GatewayPorts yes > > The 35432 port number is arbitrary. GatewayPorts must be allowed if > you're running pgAdmin on a different machine than mylocalhost. In > my case, mylocalhost is a Linux box on my LAN. > > + Open an ssh connection from mylocalhost to dbhost, and > leave it open: > > $ ssh dbhost > > These first two steps can be combined by using command-line > parameters to ssh to specify the port-forwarding, but I prefer to > use the config file method. > > + Add the following to the pg_hba.conf file on dbhost: > > host all nnn.nnn.nnn.nnn 255.255.255.255 password > > where 'nnn.nnn.nnn.nnn' is the IP address of dbhost. I found that > it didn't suffice to just have the standard similar entries for > 'local ...' and 'host all 127.0.0.1 ...'. > > + Run pgAdmin and connect to mylocalhost: > > Server: mylocalhost > Port: 35432 > Username: [as normal] > Password: [as normal] > > + When done with pgAdmin you may wish to tear down the ssh connection. > > Note that the same forwarded port can be used with all the > other Postgres utilities: > > $ psql -h mylocalhost -p 35432 -l -U postgres > $ pg_dump -h mylocalhost -p 35432 -u some_db_name > etc > > -- > Fred Yankowski fred@OntoSys.com tel: +1.630.879.1312 > Principal Consultant www.OntoSys.com fax: +1.630.879.1370 > OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA >
pgadmin-support by date: