I have a two machines, my workstation running on Arch Linux and my cloud server running on Ubuntu.
I have installed Postgresql on my server, and it is accessible via Unix Domain Socket on the server itself, now i want to connect to the postgresql server from my workstation via ssh tunneling. I used the openssh socket tunneling to try to connect:
ssh -L/tmp/postgresql:/var/run/postgresql production@<ip>
And to connect to the server i used the following command on the psql
psql -h /tmp/postgresql
But i am getting the following error.
psql: error: could not connect to server: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/postgreql/.s.PGSQL.5432"?
Is something i doing wrong?
Thanks