It is possible to use SSH to encrypt the network connection
between clients and a PostgreSQL server. Done properly, this
provides an adequately secure network connection, even for non-
SSL-capable clients. First make sure that an SSH server is
running properly on the same machine as the PostgreSQL server
and that you can log in using ssh as some user. Then you can
establish a secure tunnel with a command like this from the
client machine: ssh -L 63333:localhost:5432
firstname.lastname@example.org The first number in the -L
argument, 63333, is the port number of your end of the tunnel;
it can be any unused port. (IANA reserves ports 49152 through
65535 for private use.) The second number, 5432, is the remote
end of the tunnel: the port number your server is using. The
name or IP address between the port numbers is the host with the
database server you are going to connect to, as seen from the
host you are logging in to, which is foo.com in this example. In
order to connect to the database server using this tunn