Re: tunneling through ssh

From: jseymour(at)linxnet(dot)com (Jim Seymour)
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: tunneling through ssh
Date: 2004-08-19 02:22:33
Message-ID: 20040819022233.76F704313@jimsun.linxnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

David Bear <David(dot)Bear(at)asu(dot)edu> wrote:
>
> I'm attempting to run pgsql through a tunnel.
[snip]

Through an ssh tunnel, using port-forwarding, I'm guessing?

>
> Am I missing something obvious?

Can you "psql -p 5432" on the machine on which the server is running?

Here's what I just did successfully:

On local machine, ssh to host running pgsql server:

$ xterm -e ssh -L 57000:remote.example.com:5432 remote.example.com &

After doing the ssh pass-word/-phrase thing...

On local machine:

$ psql -U jseymour -p 57000 -h localhost
Password:
Welcome to psql 7.4.2, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

jseymour=> \q
$

Worked like a champ. This is using OpenSSH, btw.

Jim

Browse pgsql-admin by date

  From Date Subject
Next Message Somasekhar Bangalore 2004-08-19 07:41:53 Urgent --- Installation error on UltraSPARC-IIi processor version Postgres 7.3.2
Previous Message Tom Lane 2004-08-19 01:21:54 Re: tunneling through ssh