dbpf_tunnel: SSH database connection

View source: R/dbpf_con.R

dbpf_tunnelR Documentation

SSH database connection

Description

Connect to database through an SSH tunnel

Usage

dbpf_tunnel(
  ssh_user,
  ssh_host,
  ssh_keyfile,
  user,
  passwd,
  host,
  ssh_port = "22",
  port = "5432",
  local_port = "5555",
  database = "observations"
)

Arguments

ssh_user

Username with which to connect to remote host using SSH

ssh_host

Address of remote host from which request will be made (e.g. '206.12.93.23' or 'data.myserver.com')

ssh_keyfile

(optional) private key to log onto remote host (must be in OpenSSH format - *.pem). You must either provide a passwordless keyfile, or set up a keyserver to handle the keyfile password. There will be no password prompt.

user

Username for database. Passed to dbpf_con

passwd

Password for database. Passed to dbpf_con

host

Address for database server.

ssh_port

Port on which to connect using ssh

port

Port on which database server is (default based on dbpf_con)

local_port

Local port to use for tunnel.

database

Name of database (default based on dbpf_con)

Details

Acts as a wrapper combining dbpf_con and create_tunnel. Refer to those functions for more information. To auto-connect, add the following parameter keywords to the database configuration file described in dbpf_con.

user,passwd,host,port,ssh_user,ssh_host,ssh_port,ssh_keyfile,local_port

"readonly","fjZfwg?H9jDsd","256.245.11.15","5432","user01","125.25.1.35","5432","/home/user/.ssh/keyfile.pem","5555"


geocryology/PermafrostDB documentation built on April 17, 2025, 11:54 a.m.