Runs ssh -N -L <local_port>:localhost:<remote_port> <ssh_host> in the
background with processx, so cc_pg_connect() can reach the database on
localhost:<local_port>. Uses your ~/.ssh/config entry (the docs call it
calcofi: HostName ssh.calcofi.io, User <you>, IdentityFile …), so no
credentials are handled here. Windows 10+ has ssh.exe built in.
Usage
cc_pg_tunnel(
ssh_host = "calcofi",
local_port = 5432L,
remote_port = 5432L,
wait = 10
)
cc_pg_tunnel_close(ssh_host = "calcofi", local_port = 5432L)Value
the processx::process (invisibly), or NULL if the port was
already open