Can't connect to remote Postgres DB Using PGAdmin III via SSH Tunnelling
I am trying to connect remotely to a PostgreSQL DB using PGAdmin III
FYI I am using SSH Keys to connect to my instance, no passwords.
I have setup the SSH tunnel like so:
ssh -L 3333:remote.server.com:5432 email@example.com
Then in the postgresql.conf I have modified the listening addresses to:
Just in case, I also added to pg_hba.conf the line :
host all all 0.0.0.0/0 md5 however I still get the same error so I believe this is useless.
Finally in PGAdmin, I create new connection using
port: 3333 (as per local tunnel option above)
Then on SSH tunnel tab, I have a checkmark on use SSH tunneling
tunnel host: remote.server.com
tunnel post: 5432
identityfile: I point to my local idrsa.pub file
and I enter my passphrase.
I get the following error:
SSH error: Error when starting up SSH session with error code -13
I added the -v option to the SSH tunnel creation line and I see “authentication successful” as well as “local forwarding listening on 127.0.0.1 port 3333”