I'd like to use RazorSQL to connect to my database which is running on a remote server. I create a SSH tunnel on my localhost with the following command:
ssh -L 1111:remote.server.com:5432 [email protected]
I configure my connection via RazorSQL's GUI, specifying localhost
as the host and 1111
as the port. When I click on "Connect", the following error message appears:
ERROR: An error occurred while trying to make a connection to
the database:
JDBC URL: jdbc:postgresql://localhost:1111/myuser
FATAL:
no pg_hba.conf entry for host "aaa.bbb.ccc.ddd",
user "myuser", database "mydatabase", SSL off
where aaa.bbb.ccc.ddd
is a remote server's IP address.
What is more, I am not allowed to change the contents of my pg_hba.conf
file. That's how it look like at the moment:
# TYPE DATABASE USER CIDR-ADDRESS METHOD
@remove-line-for-nolocal@# "local" is for Unix domain socket connections only
@remove-line-for-nolocal@local all all @authmethod@
# IPv4 local connections:
host all all 127.0.0.1/32 @authmethod@
# IPv6 local connections:
host all all ::1/128 @authmethod@
Is it possible to connect to the database server via SSH tunnel using my current setup and without modifying the server's configuration?
@authmethod@
supposed to mean? – Conte