Accessing PostgreSQL server through a SSH Tunnel

2:24 PM Unknown 0 Comments

Step 1: Check the SSH connectivity with the server, verify username and password.

Step 2: Create the tunnel in your local system by executing the following command (It will prompt for password):
$ ssh -fNg -L 5555:localhost:5432 <user>@<server>

Step 3: Now, open your PostgreSQL client (eg, pgAdmin 3 / DBeaver / Postico for OS X / Terminal) and fill in the connection details as usual. Check the image below.
Postico for OS X

0 comments :