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 or DBeaver or Postico for OS X or Terminal) and fill in the connection details as usual. Check the image below.

Note: Yes, you’ll have to use 'localhost'.