pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: jseymour@linxnet.com
To: pgsql-admin@postgresql.org
Subject: Re: tunneling through ssh
Date: Wed, 18 Aug 2004 22:22:33 -0400 (EDT)
Message-ID: <20040819022233.76F704313@jimsun.linxnet.com> (raw)

David Bear <David.Bear@asu.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



view thread (6+ messages)  latest in thread

Message-ID: <20040819022233.76F704313@jimsun.linxnet.com>
Permalink:  ../20040819022233.76F704313@jimsun.linxnet.com/
Also on:    postgresql.org/message-id/20040819022233.76F704313@jimsun.linxnet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: jseymour@linxnet.com
  Subject: Re: tunneling through ssh
  In-Reply-To: <20040819022233.76F704313@jimsun.linxnet.com>
  References: <20040819022233.76F704313@jimsun.linxnet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox