pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
documentation for ssh tunnelling of connections?
3+ messages / 3 participants
[nested] [flat]

* documentation for ssh tunnelling of connections?
@ 1999-09-07 17:21  Eric Marsden <emarsden@mail.dotcom.fr>
  0 siblings, 1 reply; 3+ messages in thread

From: Eric Marsden @ 1999-09-07 17:21 UTC (permalink / raw)
  To: pgsql-interfaces

Hi,

Can anyone point me to some documentation describing how to set up ssh
to tunnell TCP/IP connections to a backend? My searches have found several
people saying it is possible, but no step-by-step explanation I could
point people to.

TIA,

-- 
Eric Marsden
It's elephants all the way down



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [INTERFACES] documentation for ssh tunnelling of connections?
@ 1999-09-07 19:31  Gene Selkov Jr. <selkovjr@xnet.com>
  parent: Eric Marsden <emarsden@mail.dotcom.fr>
  0 siblings, 0 replies; 3+ messages in thread

From: Gene Selkov Jr. @ 1999-09-07 19:31 UTC (permalink / raw)
  To: Eric Marsden <emarsden@mail.dotcom.fr>; pgsql-interfaces

Eric Marsden wrote:

> Can anyone point me to some documentation describing how to set up ssh
> to tunnell TCP/IP connections to a backend? My searches have found several
> people saying it is possible, but no step-by-step explanation I could
> point people to.

Eric,

It's the documentation for SSH that you are looking for. Please refer to
http://www.heimhardt.de/htdocs/ssh.html for better insight.

A step-by-step explanation can be done in just two steps:

1. Establish a tunnel to the backend machine, like this:

	ssh -L 3333:wit.mcs.anl.gov:5432 postgres@wit.mcs.anl.gov

   The first number in the -L argument, 3333, is the port number of
   your end of the tunnel. The second number, 5432, is the remote
   end of the tunnel -- the port number your backend is using. The
   name or the address in between the port numbers belongs to the
   server machine, as does the last argument to ssh that also includes
   the optional user name. Without the user name, ssh will try the
   name you are currently logged on as on the client machine. You can
   use any user name the server machine will accept, not necessarily
   those related to postgres.

2. Now that you have a running ssh session, you can connect a
   postgres client to your local host at the port number you
   specified in step 1. If it's psql, you will need another shell
   because the shell session you used in step 1 is now
   occupied with ssh.

	psql -h localhost -p 3333 -d mpw


Note that you have to specify the -h argument to cause your client to
use the TCP socket instead of the Unix socket. You can omit the port
argument if you chose 5432 as your end of the tunnel.

--Gene





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [INTERFACES] documentation for ssh tunnelling of connections?
@ 1999-09-08 01:39  Gene Selkov, Jr. <selkovjr@mcs.anl.gov>
  0 siblings, 0 replies; 3+ messages in thread

From: Gene Selkov, Jr. @ 1999-09-08 01:39 UTC (permalink / raw)
  To: pgsql-interfaces

Eric Marsden wrote:

> Can anyone point me to some documentation describing how to set up ssh
> to tunnell TCP/IP connections to a backend? My searches have found several
> people saying it is possible, but no step-by-step explanation I could
> point people to.

Eric,

It's the documentation for SSH that you are looking for. Please refer to
http://www.heimhardt.de/htdocs/ssh.html for better insight.

A step-by-step explanation can be done in just two steps:

1. Establish a tunnel to the backend machine, like this:

	ssh -L 3333:wit.mcs.anl.gov:5432 postgres@wit.mcs.anl.gov

   The first number in the -L argument, 3333, is the port number of
   your end of the tunnel. The second number, 5432, is the remote
   end of the tunnel -- the port number your backend is using. The
   name or the address in between the port numbers belongs to the
   server machine, as does the last argument to ssh that also includes
   the optional user name. Without the user name, ssh will try the
   name you are currently logged on as on the client machine. You can
   use any user name the server machine will accept, not necessarily
   those related to postgres.

2. Now that you have a running ssh session, you can connect a
   postgres client to your local host at the port number you
   specified in step 1. If it's psql, you will need another shell
   because the shell session you used in step 1 is now
   occupied with ssh.

	psql -h localhost -p 3333 -d mpw


Note that you have to specify the -h argument to cause your client to
use the TCP socket instead of the Unix socket. You can omit the port
argument if you chose 5432 as your end of the tunnel.

--Gene




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~1999-09-08 01:39 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-09-07 17:21 documentation for ssh tunnelling of connections? Eric Marsden <emarsden@mail.dotcom.fr>
1999-09-07 19:31 ` Gene Selkov Jr. <selkovjr@xnet.com>
1999-09-08 01:39 Re: [INTERFACES] documentation for ssh tunnelling of connections? Gene Selkov, Jr. <selkovjr@mcs.anl.gov>

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