From: Jing Tian Date: 2010-05-12T23:16:54+09:00 Subject: Re: Connect to postgresql on remote host Waldemar Dick wrote: > It seems sshd is listening on port 8022. On which port is postgresql > listening? > > If postgresql is listening on some local port only bound to the host > itself (127.0.0.1), then you can tunnel your PGconn through SSH. > > Open a SSH tunnel on your local machine: e.g. > ssh -p 8022 -N -v -L > :urgewalten.de: user@host > > then you can open a postgresql connection to > localhost: and it will be forwarded to your > destination host. > > Greetings, > > Waldemar Thanks so much Waldemar for the comments. I am complete new to ruby. Right now we are trying to come up some ruby code getting data from the database on a remote host. I think postgresql is on port 5432 of the host. I don't understand open a ssh tunnel when you said ssh -p 8022 -N -v -L :urgewalten.de: user@host what is urgewalten.de? Can I do it through ruby code? Sorry about bugging you again :) -- Posted via http://www.ruby-forum.com/.