Connection to pg over ssh #1675
Answered
by
jackc
NiknamankiN
asked this question in
Q&A
-
Hello, I'm a newbie for go, could you provide any examples of establishing a connection to postgresql over ssh using pgxpool? Unfortunately, I could not find a working example myself... |
Beta Was this translation helpful? Give feedback.
Answered by
jackc
Jul 7, 2023
Replies: 1 comment 1 reply
-
https://github.com/jackc/tern has ssh tunneling built in. https://github.com/jackc/tern/blob/3b4b9b73743467e62d1214c28b8ce7d952ca14de/main.go#L141-L150 is a good starting place in the code. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
NiknamankiN
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/jackc/tern has ssh tunneling built in. https://github.com/jackc/tern/blob/3b4b9b73743467e62d1214c28b8ce7d952ca14de/main.go#L141-L150 is a good starting place in the code.