-
Notifications
You must be signed in to change notification settings - Fork 721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connect using SSH tunnel #66
Comments
Can't someone who knows how to tunnel just set it up before running pgweb? I think it is normal to setup a tunnel or SOCKS proxy separately from a client. Do other pg clients make this easy?
I've only used Putty on Windows, and it was a long time ago. It supported SOCKS, at least. |
Back when I was a Windows user there was a pretty standard tool for solving I agree with Chris' assessment which is that merging this functionality -p On Fri, Nov 21, 2014 at 12:59 AM, Chris Bandy notifications@github.com
|
Yeah, i posted instructions on how to connect via ssh gateway. But the reason why i want to merge this functionality into pgweb is to simplify usage. Go has ssh support so it just makes sense to implement native support. |
Closing this issue for now. SSH support might be added some day. |
Everything works fine until you want to connect to a postgres server that sits behind firewall.
The only option in this case is to use ssh tunnels. In order to make it work, user has to use
ssh
to establish connection with a remote machine. Example:This should work on linux and osx but not on windows, which does not have a standard
ssh
binary available. I've been digging around to find any good and stable example on how to run
ssh tunnel programmatically with Go. No luck yet.
Having ability to connect to a behind-firewall postgres instance is very useful and i tend to just go ahead
and implement "experimental" support for this feature using good old
exec.Command
that'll spawnssh
and establish a tunnel. I have already tried this solution and it works great (except when internet connection is shitty), client code that communicates with postgres server does not have to be changed at all. But it makes
pgweb
environment-dependent, which is not great.Would like to get some feedback or even examples on how to get this feature done.
@cbandy @pvh any thoughts?
The text was updated successfully, but these errors were encountered: