pg icon indicating copy to clipboard operation
pg copied to clipboard

Connect to database through SSH

Open nghtstr opened this issue 4 years ago • 2 comments

I am sure that I am overlooking this completely, but this is for a small project that would be ran on a local machine. I am wanting to use that user's id_rsa file (~/.ssh/id_rsa) for the private key to authorize the SSH connection that the database would then connect through (Tunneling). There doesn't seem to be any examples of how to do this online, and so far every attempt I have made using the Dialer of Options hasn't worked.

Any help you could give would be greatly appreciated.

Edit: I realized that we are talking about a SSH tunnel, but I am still hitting a brick wall

nghtstr avatar Mar 12 '20 23:03 nghtstr

I really do not want to keep bumping up this thread, but it is essential that we have SSH Tunneling in place so we can use this. Does anyone have any ideas how I might be able to make this work?

nghtstr avatar Mar 23 '20 19:03 nghtstr

No ideas here. I would ask on Stackoverflow/golang-nuts for any SSH tunneling solution for Go and then try to apply it to go-pg. It does not seem to be specific to go-pg.

vmihailenco avatar Apr 11 '20 06:04 vmihailenco