pg
pg copied to clipboard
Connect to database through SSH
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
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?
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.