Database connection over specific SSL port

13 views
Skip to first unread message

Ronald van Raaphorst

unread,
Apr 18, 2024, 5:21:33 PMApr 18
to vert.x
Hi,

I'm looking for a way to access a remote Postgres database over SSL using a specific SSL port.
On the command line for port 12345, I'd use:

ssh us...@some.server.com -p 12345

What I have is:

val pgConnectOptions = PgConnectOptions()
     .setPort(5432)
     .setHost("some.server.com")
     .setDatabase("catalog")
     .setUser("user")
     .setPassword("password")
     .setSsl(true)
     .setPemTrustOptions(PemTrustOptions().addCertPath(".../certificate.pem"))

 val pgPoolOptions = PoolOptions()
 pool = PgPool.pool(vertx, pgConnectOptions, pgPoolOptions)

But I can't find the option to set the SSL port (12345 as example) somewhere.
Can anyone point me in the right direction?

Thx,
Ronald

GERARD Nicolas

unread,
Apr 22, 2024, 2:59:42 AMApr 22
to vert.x
Do you mean a tunnel?
For this, you can use Jsch in Java.

Reply all
Reply to author
Forward
0 new messages