I have setup ssh connexion to my droplet, I have root user and non-root with privilege user. All is working fine.
I have setup a postgresql database and create a db owned by the non-root user. If I’m login with this user, I can log to the database.
Now I want to use PgAdmin4 or DBeaver to access this db with a UI than with terminal. I want to use SSH Tunnel for security reason. But nothing I trying is working…
I setup my SSH Tunnel with
ssh -L 5432:127.0.0.1:5432 email@example.com
Both pgadmin and dbeaver can’t login to the database.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $200 of credit to try our products over 60 days!
Indeed, it should work as follows:
However, note that if you have Postgres running locally on your laptop and it is already listening on port 5432, then you should use a different local port, eg:
The syntax itself is as follows:
Hope that this helps!
After some test and research, I try to change the port number from 5432 to 22 that is the port for SSH in the setting and it’s work !
Absolutely not easy to understand the field “port” in ssh is different than in general setting