3

I've been using dplyr's SQL backend for certain databases. But I can't get it to work with one that uses SSL authentication.

I keep getting this error:

RS-DBI driver: (could not connect [username]@[host] on dbname "[dbname]")

I tried adapting the top-voted question here:

Connect to Redshift via SSL using R

By passing the SSL parameters via dbname. But got the same error as above.

The top answer here:

Can not connect PostgreSQL(over SSL) with RPostgresql on Windows

Worked for me, but it only lets me pass SQL commands via R, not to write dplyr commands that are translated to SQL.

Anyone else encounter this and have a fix?

Community
  • 1
  • 1
Haggerston
  • 31
  • 1
  • You could try to open an ssh tunnel to the postgres instance e.g. via putty and use portforwarding. That way you would only connect to localhost:2345 and you are connected via ssl. (assumg 2345 is the port you forward to remote.host:port-of-postgres) – Rentrop Feb 15 '17 at 02:31

0 Answers0