Hi I am trying to connect to Postgres from pgAdmin3 using SSH tunneling. However I am not using standard port 22. How can I do SSH tunneling using a non standard port?


You could setup the ssh connection and tunnel outside pgAdmin and just let pgAdmin connect to the localport.

On windows you could use putty for this on unixes you can use ssh

If you use 15432 as localport then you can let pgAdmin connect to localhost with port 15432 and you leave the SSH tunnel option in pgAdmin OFF!

  • 1
    +1 This is the correct answer. Make the tunnel in putty localhost:15432 -> remote server:5432 and then connect through pgAdmin at localhost:15432. – Alexandros Mar 19 '14 at 17:17

In the PGAdmin III connection manager, there is an option for the port you'd like to use under SSH tunnel. It looks like a port option was added for SSH tunneling recently. Are you using the newest version?

Here is a link to the PGAdmin III connection manager screen that shows the SSH Tunnel tab.

Update: The latest binary build with this fix is not posted to the website yet. I suggest building it yourself from the development site or else contacting the maintainer to inquire about when the newest binary release will be ready.

  • 1
    This port in the screen is not for SSH tunneling rather for connecting with the database port. Say you have a db at port 5432 once you connect to DB via SSH using SSH port then you will connect to DB using port 5432. – Muhammad Raihan Muhaimin Mar 18 '14 at 20:29
  • You're right. The latest build is Oct. 11, 2013. That fix was committed on Nov 20, 2013. So it looks like they have not yet posted the source code or the binaries for the latest versions. If you are adventurous, you could build it from GIT source or else you might contact the maintainer (Dave Page) and ask about the newest build. pgadmin.org/development/git.php – efesar Mar 18 '14 at 21:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.