SSL connection through R and/or R Studio on Windows

0

I was wondering if anyone has connected to an SSL secure host via R or R studio? I've tried several different options but none have been successful.

  1. yaml configuration file
  2. sslmode = TRUE/ALLOW/REQUIRE
  3. sllmode = verify - ca

I do not have access to the server.

I'm running the following code in R Studio:

db <- dbConnect( dbDriver('PostgreSQL'), user = 'username', password = '*******.', dbname = 'dbname', host = 'host', port = 1234, sslmode='verify-full' )

I get the following error message:

Error in postgresqlNewConnection(drv, ...) : unused argument (sslmode = "verify-full")

Reading through this https://www.postgresql.org/docs/9.1/libpq-ssl.html, I think I need figure out how to enable libpq on my local machine to get the handshake to work with the database needing the ssl connection.

I also ran the following this in R Studio:

db <- dbConnect( dbDriver('PostgreSQL'), user = 'USERNAME', password = '*****', dbname = 'DBNAME?ssl=true', host = 'HOST', port = 1234 )

My entire R Studio session fails.

Now I've run the following in R Studio:

con <- dbConnect(dbDriver('PostgreSQL'), dbname = 'dbname=DBNAME sslmode=require', host = 'HOST', port = 1234, user = 'USERNAME', password = 'PASSWORD')

This gave me the following error message:

Error in postgresqlNewConnection(drv, ...) : RS-DBI driver: (could not connect host on dbname "dbname": sslmode value "verify-full" invalid when SSL support is not compiled in )

I've installed and enabled the following packages:

  • DBI
  • RPostgreSQL
  • tidyverse
  • dbplyr
  • ggplot2
  • openssl
  • lubridate

Andrew

Posted 2019-01-15T14:31:52.483

Reputation: 11

HI Andrew, Can you please provide more details here. Specifically, the error message you receive when trying to connect? – Stese – 2019-01-15T16:24:40.823

HI Andrew, all of this information would be better placed as an edit to your question, rather than comments. :) – Stese – 2019-01-17T09:43:35.657

No answers