Re: Connect to PostgreSQL server from an ADSL connection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le dimanche 01 janvier 2006 à 20:05 +0100, Szabolcs Andrási a écrit :
> > ssh -v -L 5432:localhost:5432 dbuser@xxxxxxxxxxxxxxxxxxx
> >
> > 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@xxxxxxxxxxxxxxx

> - 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



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux