Sunday, July 02, 2006

SSH tunnel

I needed to connect to a remote Postgres server and the serveradmin was appropriately reluctant to open up post 5432.

Simple solution was to create an ssh tunnel. I'm running a Postgres server locally, so I didn't want to forward port 5432 to the remote machine.
ssh -L5431:localhost:5432 server.with.the.postgres.db

No comments: